File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ public class Router: ObservableObject {
1010
1111 public init ( ) {
1212 isFirstLaunch = UserDefaultsStorage . shared. isFirstLaunch
13+
14+ // TODO: Find better way
15+ if isFirstLaunch {
16+ UserDefaultsStorage . shared. showInfraredRemoteTab = false
17+ }
1318 }
1419
1520 public func showWelcomeScreen( ) {
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ public class UserDefaultsStorage {
2020 @UserDefault ( key: . hasReaderLog, defaultValue: false )
2121 public var hasReaderLog : Bool
2222
23+ @UserDefault ( key: . showInfraredRemoteTab, defaultValue: true )
24+ public var showInfraredRemoteTab : Bool
25+
2326 // MARK: Debug
2427
2528 @UserDefault ( key: . isDebugMode, defaultValue: false )
@@ -96,6 +99,7 @@ public extension UserDefaults {
9699 case hasReaderLog = " hasReaderLog "
97100 case showAppsUpdate = " showAppsUpdate "
98101 case hiddenApps = " hiddenApps "
102+ case showInfraredRemoteTab = " showInfraredRemoteTab "
99103
100104 case isDebugMode = " isDebugMode "
101105 case isSyncingDisabled = " isSyncingDisabled "
Original file line number Diff line number Diff line change @@ -17,24 +17,15 @@ struct InfraredLibraryCard: View {
1717 }
1818
1919 struct Badge : View {
20- @Environment ( \. colorScheme) var colorScheme
21-
22- private var color : Color {
23- switch colorScheme {
24- case . light: return . black40
25- default : return . black30
26- }
27- }
28-
2920 var body : some View {
3021 Text ( " Beta " )
3122 . font ( . system( size: 12 ) )
3223 . padding ( . horizontal, 8 )
3324 . padding ( . vertical, 4 )
34- . foregroundColor ( color )
25+ . foregroundColor ( . sGreen )
3526 . overlay (
3627 RoundedRectangle ( cornerRadius: 30 )
37- . stroke ( color , lineWidth: 1 )
28+ . stroke ( Color . sGreen , lineWidth: 1 )
3829 )
3930 . padding ( . trailing, 4 )
4031 }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ struct MainView: View {
1010 @StateObject var tabViewController : TabViewController = . init( )
1111
1212 @AppStorage ( . selectedTab) var selectedTab : TabView . Tab = . device
13+ @AppStorage ( . showInfraredRemoteTab) var showInfraredRemoteTab = true
1314
1415 var body : some View {
1516 VStack ( spacing: 0 ) {
@@ -50,5 +51,11 @@ struct MainView: View {
5051 WidgetCenter . shared. reloadTimelines ( ofKind: " LiveWidget " )
5152 }
5253 }
54+ . onAppear {
55+ if showInfraredRemoteTab {
56+ selectedTab = . hub
57+ showInfraredRemoteTab = false
58+ }
59+ }
5360 }
5461}
You can’t perform that action at this time.
0 commit comments