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 @@ -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