Skip to content

Commit 0febb04

Browse files
committed
format code
1 parent db44f92 commit 0febb04

22 files changed

+358
-438
lines changed

iosApp/iosApp/FlareApp.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import FontAwesomeSwiftUI
12
import shared
23
import SwiftUI
3-
import FontAwesomeSwiftUI
44

55
@main
66
struct FlareApp: SwiftUI.App {
@@ -14,7 +14,7 @@ struct FlareApp: SwiftUI.App {
1414
init() {
1515
// Register FontAwesome fonts
1616
FontAwesome.register()
17-
17+
1818
KoinHelper.shared.start(inAppNotification: SwitUIInAppNotification())
1919

2020
// 初始化UserManager

iosApp/iosApp/UI/Navigation/FlareAppState.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class FlareAppState: ObservableObject {
66
// @Published var isMenuOpen: Bool = false
77
// @Published var menuProgress: CGFloat = 0.0 // 0表示完全关闭,1表示完全打开
88

9-
@Published var isCustomTabBarHidden: Bool = false
9+
@Published var isCustomTabBarHidden: Bool = false
1010

1111
@Published var selectedTab: Int = 0
1212
@Published var previousTab: Int = 0

iosApp/iosApp/UI/Navigation/FlareHomeTabs.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ enum FlareHomeTabs: Int, Equatable, Hashable, Identifiable {
55
case compose = 2
66
case discover = 3
77
case profile = 4
8-
case menu = 5
8+
case menu = 5
99

1010
var customizationID: String {
1111
switch self {
@@ -14,7 +14,7 @@ enum FlareHomeTabs: Int, Equatable, Hashable, Identifiable {
1414
case .compose: "home_compose"
1515
case .discover: "home_discover"
1616
case .profile: "home_profile"
17-
case .menu: "home_menu"
17+
case .menu: "home_menu"
1818
}
1919
}
2020
}

iosApp/iosApp/UI/Navigation/FlareNavigationGestureModifier.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import SwiftUI
33

44
/// 统一的导航手势修饰符
55
//
6-
//struct FlareNavigationGestureModifier: ViewModifier {
6+
// struct FlareNavigationGestureModifier: ViewModifier {
77
// @ObservedObject var router: FlareRouter
88
//
99
// @Environment(\.dismiss) private var dismiss
@@ -238,10 +238,10 @@ import SwiftUI
238238
// }
239239
// }
240240
// }
241-
//}
241+
// }
242242
//
243-
//extension View {
243+
// extension View {
244244
// func flareNavigationGesture(router: FlareRouter) -> some View {
245245
// modifier(FlareNavigationGestureModifier(router: router))
246246
// }
247-
//}
247+
// }

iosApp/iosApp/UI/Navigation/FlareRootView.swift

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,54 +29,54 @@ struct FlareRootView: View {
2929
String(describing: ObjectIdentifier(router)))
3030

3131
// FlareMenuContainer(
32-
// content:
32+
// content:
3333
// appState: appState,
3434
// router: router
3535
// )
3636
HomeContent(accountType: accountType)
37-
.environmentObject(appState)
38-
.environmentObject(router)
39-
.sheet(isPresented: $router.isSheetPresented) {
40-
if let destination = router.activeDestination {
41-
FlareDestinationView(
42-
destination: destination,
43-
router: router,
44-
appState: appState
45-
)
37+
.environmentObject(appState)
38+
.environmentObject(router)
39+
.sheet(isPresented: $router.isSheetPresented) {
40+
if let destination = router.activeDestination {
41+
FlareDestinationView(
42+
destination: destination,
43+
router: router,
44+
appState: appState
45+
)
46+
}
4647
}
47-
}
48-
.fullScreenCover(isPresented: $router.isFullScreenPresented) {
49-
if let destination = router.activeDestination {
50-
FlareDestinationView(
51-
destination: destination,
52-
router: router,
53-
appState: appState
48+
.fullScreenCover(isPresented: $router.isFullScreenPresented) {
49+
if let destination = router.activeDestination {
50+
FlareDestinationView(
51+
destination: destination,
52+
router: router,
53+
appState: appState
54+
)
55+
}
56+
}
57+
.alert(isPresented: $router.isDialogPresented) {
58+
Alert(
59+
title: Text("OK"),
60+
message: Text("Are you sure ?"),
61+
primaryButton: .destructive(Text("OK")) {
62+
// 处理确认操作
63+
},
64+
secondaryButton: .cancel(Text("Cancel"))
5465
)
5566
}
56-
}
57-
.alert(isPresented: $router.isDialogPresented) {
58-
Alert(
59-
title: Text("OK"),
60-
message: Text("Are you sure ?"),
61-
primaryButton: .destructive(Text("OK")) {
62-
// 处理确认操作
63-
},
64-
secondaryButton: .cancel(Text("Cancel"))
65-
)
66-
}
67-
.sheet(isPresented: $composeManager.showCompose) {
68-
if let accountType = composeManager.composeAccountType {
69-
NavigationView {
70-
ComposeScreen(
71-
onBack: {
72-
composeManager.dismiss()
73-
},
74-
accountType: accountType,
75-
status: convertToSharedComposeStatus(composeManager.composeStatus)
76-
)
67+
.sheet(isPresented: $composeManager.showCompose) {
68+
if let accountType = composeManager.composeAccountType {
69+
NavigationView {
70+
ComposeScreen(
71+
onBack: {
72+
composeManager.dismiss()
73+
},
74+
accountType: accountType,
75+
status: convertToSharedComposeStatus(composeManager.composeStatus)
76+
)
77+
}
7778
}
7879
}
79-
}
8080
} else {
8181
ProgressView()
8282
}

iosApp/iosApp/UI/Navigation/FlareRouter.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class FlareRouter: ObservableObject {
4141

4242
return depth
4343
}
44+
4445
@Published var menuNavigationPath = NavigationPath()
4546
@Published var timelineNavigationPath = NavigationPath()
4647
@Published var discoverNavigationPath = NavigationPath()

iosApp/iosApp/UI/Page/Home/View/SwiftUI/HomeTabScreenSwiftUI.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import SwiftUI
44
struct HomeTabScreenSwiftUI: View {
55
let accountType: AccountType
66

7-
var onSwitchToMenuTab: (() -> Void)?
8-
7+
var onSwitchToMenuTab: (() -> Void)?
8+
99
@StateObject private var tabStore = AppBarTabSettingStore.shared
1010
@State private var selectedTabKey: String = ""
1111
@State private var showAppbarSettings = false
@@ -18,7 +18,7 @@ struct HomeTabScreenSwiftUI: View {
1818
tabs: tabStore.availableAppBarTabsItems,
1919
user: tabStore.currentUser,
2020
accountType: accountType,
21-
onAvatarTap: {
21+
onAvatarTap: {
2222
onSwitchToMenuTab?()
2323
},
2424
onSettingsTap: {

iosApp/iosApp/UI/Page/Home/View/SwiftUI/TabContentViewSwiftUI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct TabContentViewSwiftUI: View {
9292
// Spacer()
9393
// }
9494
// .frame(maxHeight: .infinity)
95-
//// .gesture(edgeSwipeGesture)
95+
//// .gesture(edgeSwipeGesture)
9696
// .allowsHitTesting(true)
9797
// }
9898
}

0 commit comments

Comments
 (0)