feat: 增强FeedListFeature和MeFeature的首次加载逻辑
- 在FeedListFeature和MeFeature中新增isFirstLoad状态,确保仅在首次加载时请求数据。 - 更新MainView以简化视图切换逻辑,使用isHidden修饰符控制视图显示。 - 新增View+isHidden扩展,提供视图隐藏功能,提升代码可读性和复用性。
This commit is contained in:
@@ -103,10 +103,10 @@ struct MainFeature: Reducer {
|
||||
}
|
||||
}
|
||||
// 设置页作用域
|
||||
.ifLet(\ .settingState, action: /Action.settingAction) {
|
||||
.ifLet(\ .settingState, action: \.settingAction) {
|
||||
SettingFeature()
|
||||
}
|
||||
.ifLet(\ .appSettingState, action: /Action.appSettingAction) {
|
||||
.ifLet(\ .appSettingState, action: \.appSettingAction) {
|
||||
AppSettingFeature()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user