Skip to content

Commit 0205730

Browse files
committed
format
1 parent 3ea0adb commit 0205730

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

iosApp/iosApp/UI/Page/Home/View/Home/HomeTabViewContentViewSwiftUI.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ struct HomeTabViewContentViewSwiftUI: View {
1010
var body: some View {
1111
let displayType: TimelineDisplayType = appSettings.appearanceSettings.timelineDisplayType
1212

13-
1413
let _ = FlareLog.debug("🔍 [HomeTabView] Current selectedTab: '\(selectedTab)'")
1514

1615
TabView(selection: $selectedTab) {
1716
ForEach(tabStore.availableAppBarTabsItems, id: \.key) { tab in
18-
1917
let isCurrentAppBarTabSelected = selectedTab == tab.key
2018
let _ = FlareLog.debug("🔍 [HomeTabView] Tab '\(tab.key)': selectedTab==tab.key -> \(isCurrentAppBarTabSelected)")
2119

iosApp/iosApp/UI/Page/Profile/Data/ProfilePresenterWrapper.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ class ProfilePresenterWrapper: ObservableObject {
2828
@Published private(set) var currentTabViewModel: ProfileTabViewModel?
2929
@Published private(set) var isInitialized: Bool = false
3030

31-
var isCurrentTabActive: Bool {
32-
guard let selectedTabKey = selectedTabKey,
33-
let currentTabKey = currentTabViewModel?.tabItem.key else {
31+
var isCurrentTabActive: Bool {
32+
guard let selectedTabKey,
33+
let currentTabKey = currentTabViewModel?.tabItem.key
34+
else {
3435
return false
3536
}
3637
return selectedTabKey == currentTabKey
3738
}
3839

39-
func isTabCurrent(_ tabKey: String) -> Bool {
40-
return selectedTabKey == tabKey
40+
func isTabCurrent(_ tabKey: String) -> Bool {
41+
selectedTabKey == tabKey
4142
}
4243

4344
private var tabViewModels: [String: ProfileTabViewModel] = [:]
@@ -56,12 +57,11 @@ class ProfilePresenterWrapper: ObservableObject {
5657

5758
@MainActor
5859
func setup() async {
59-
6060
guard !isInitialized else {
6161
FlareLog.debug("⏭️ [ProfilePresenterWrapper] Already initialized, skipping setup")
6262
return
6363
}
64-
64+
6565
do {
6666
FlareLog.debug("🚀 [ProfilePresenterWrapper] 开始setup")
6767

iosApp/iosApp/UI/Page/Profile/SwiftUIView/ProfileSwiftUIViewV2.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ struct ProfileSwiftUIViewV2: View {
5151
.id("tabbar")
5252
}
5353

54-
5554
if let currentTabViewModel = presenterWrapper.currentTabViewModel {
5655
let isCurrentTab = presenterWrapper.isCurrentTabActive
5756

@@ -84,7 +83,6 @@ struct ProfileSwiftUIViewV2: View {
8483
handleProfileScrollChange(newValue.contentOffset.y)
8584
}
8685
.onChange(of: timelineState.scrollToTopTrigger) { _, _ in
87-
8886
let isCurrentTab = presenterWrapper.isCurrentTabActive
8987
guard isCurrentTab else {
9088
FlareLog.debug("⏸️ [ProfileSwiftUIViewV2] Skipping scroll to top - not current tab")
@@ -157,7 +155,7 @@ struct ProfileSwiftUIViewV2: View {
157155

158156
extension ProfileSwiftUIViewV2 {
159157
private func handleProfileScrollChange(_ offsetY: CGFloat) {
160-
//FlareLog.debug("📜 [ProfileSwiftUIViewV2] Profile滚动检测 - offsetY: \(offsetY), tabBarOffset: \(timelineState.tabBarOffset)")
158+
// FlareLog.debug("📜 [ProfileSwiftUIViewV2] Profile滚动检测 - offsetY: \(offsetY), tabBarOffset: \(timelineState.tabBarOffset)")
161159

162160
if let currentTabViewModel = presenterWrapper.currentTabViewModel {
163161
currentTabViewModel.timelineViewModel.handleScrollOffsetChange(

iosApp/iosApp/UI/Page/Profile/SwiftUIView/ProfileTabBarViewV2.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ struct ProfileTabBarViewV2: View {
2222
}
2323

2424
private var tabPickerView: some View {
25-
// FlareLog.debug("🎨 [ProfileTabBarV2] 渲染Picker - availableTabs数量: \(availableTabs.count)")
26-
// for (index, tab) in availableTabs.enumerated() {
27-
//let title = getTabTitle(tab.metaData.title)
25+
// FlareLog.debug("🎨 [ProfileTabBarV2] 渲染Picker - availableTabs数量: \(availableTabs.count)")
26+
// for (index, tab) in availableTabs.enumerated() {
27+
// let title = getTabTitle(tab.metaData.title)
2828
// FlareLog.debug("🎨 [ProfileTabBarV2] Tab[\(index)]: key=\(tab.key), title=\(title)")
2929
// }
3030

31-
return Picker("Profile Tabs", selection: Binding(
31+
Picker("Profile Tabs", selection: Binding(
3232
get: {
3333
let current = selectedTabKey ?? availableTabs.first?.key ?? ""
34-
//FlareLog.debug("🎯 [ProfileTabBarV2] 当前选中Tab: \(current)")
34+
// FlareLog.debug("🎯 [ProfileTabBarV2] 当前选中Tab: \(current)")
3535
return current
3636
},
3737
set: { newValue in

0 commit comments

Comments
 (0)