对齐旅拍相册详情页 Android UI,并修复网格预览与布局问题。
重构相册详情为信息卡片、Tab 筛选、排序、批量删除与底部上传栏;修复网格重叠、禁用按钮蒙层,并支持点击预览大图。同步扩展素材列表 API 与 ViewModel 分页逻辑,并优化有线传图缩略图与传输性能。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -19,6 +19,7 @@ final class WiredTransferPhotoGroupingTests: XCTestCase {
|
||||
let sections = photos.buildPhotoSections()
|
||||
XCTAssertEqual(sections.count, 2)
|
||||
XCTAssertEqual(sections[0].photos.count, 2)
|
||||
XCTAssertEqual(sections[0].photos[0].id, "2")
|
||||
XCTAssertTrue(sections[0].headerTitle.contains("12:00 - 12:30"))
|
||||
|
||||
let sidebar = photos.buildSidebarGroups()
|
||||
@ -39,6 +40,17 @@ final class WiredTransferPhotoGroupingTests: XCTestCase {
|
||||
XCTAssertFalse(makePhoto(id: "old", capturedAt: "2020-01-01 10:00:00", status: .pending).isCapturedToday())
|
||||
}
|
||||
|
||||
/// 测试按拍摄时间倒序排列,最新照片在最前。
|
||||
func testSortedByCaptureTimeDescending() {
|
||||
let photos = [
|
||||
makePhoto(id: "1", capturedAt: "2026-05-20 12:05:18", status: .uploaded),
|
||||
makePhoto(id: "2", capturedAt: "2026-05-20 12:18:06", status: .pending),
|
||||
makePhoto(id: "3", capturedAt: "2026-05-20 11:55:51", status: .failed),
|
||||
]
|
||||
|
||||
XCTAssertEqual(photos.sortedByCaptureTimeDescending().map(\.id), ["2", "1", "3"])
|
||||
}
|
||||
|
||||
/// 测试 Tab 计数与 pending 可选集合。
|
||||
func testTransferTabCountsAndSelectablePendingIDs() {
|
||||
let photos = [
|
||||
|
||||
Reference in New Issue
Block a user