Refactor home to single collection view and add all-functions customization.
Replace scroll/stack layout with one UICollectionView, fix grid column math and Diffable item IDs so location report and quick actions render, and add the customizable all-functions page with persistence and tests. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -47,4 +47,15 @@ final class HomeCommonMenuStoreTests: XCTestCase {
|
||||
)
|
||||
XCTAssertEqual(common.map(\.uri), ["cloud_management"])
|
||||
}
|
||||
|
||||
func testSplitMenusSeparatesCommonAndMore() {
|
||||
let menus = [
|
||||
HomeMenuItem(uri: "wallet", title: "钱包", iconName: "wallet.pass"),
|
||||
HomeMenuItem(uri: "cloud_management", title: "云盘", iconName: "icloud"),
|
||||
HomeMenuItem(uri: "task_management", title: "任务", iconName: "checklist"),
|
||||
]
|
||||
let split = HomeCommonMenuStore.splitMenus(from: menus, commonURIs: ["wallet", "task_management"])
|
||||
XCTAssertEqual(split.common.map(\.uri), ["wallet", "task_management"])
|
||||
XCTAssertEqual(split.more.map(\.uri), ["cloud_management"])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user