模块化 AppStore 并完善素材管理与个人空间设置。
将会话、权限、位置、收款与排队存储拆分为独立模块,同步更新各 ViewModel 与单元测试,并补充素材管理 UI 与个人空间设置交互。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -15,7 +15,7 @@ enum AppRouter {
|
||||
|
||||
/// 根据登录态创建根控制器:已登录 → 主页 Tab,未登录 → 登录页。
|
||||
static func makeRootViewController() -> UIViewController {
|
||||
makeViewController(for: AppStore.shared.isLoggedIn ? .mainTab : .login)
|
||||
makeViewController(for: AppStore.shared.session.isLoggedIn ? .mainTab : .login)
|
||||
}
|
||||
|
||||
/// 切换窗口根控制器。
|
||||
@ -25,7 +25,7 @@ enum AppRouter {
|
||||
|
||||
/// 根据当前登录态刷新根控制器。
|
||||
static func refreshRoot(on window: UIWindow?, animated: Bool = true) {
|
||||
setRoot(AppStore.shared.isLoggedIn ? .mainTab : .login, on: window, animated: animated)
|
||||
setRoot(AppStore.shared.session.isLoggedIn ? .mainTab : .login, on: window, animated: animated)
|
||||
}
|
||||
|
||||
private static func makeViewController(for root: Root) -> UIViewController {
|
||||
|
||||
Reference in New Issue
Block a user