@@ -174,56 +174,32 @@ class MainActivity : ComponentActivity() {
174174 val value2 = checkLoggedInState(auth)
175175 setNotificationMap()
176176
177+ setContent {
178+ if (value2) {
177179
178- println (" users.value@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" )
179- // val shit = service.getUsers()
180- // println(shit)
181-
180+ this .window.statusBarColor = Color (0xFFD7C488 ).toArgb()
181+ this .window.navigationBarColor = Color (0xFFD7C488 ).toArgb()
182182
183- // getCelebrities( )
184- if (value2) {
185- setContent {
186- // val users = produceState<List<PostResponse>>(
187- // initialValue = emptyList() ,
188- // producer = {
189- // value = service.getUsers( )
190- // }
191- // )
192- // println(users.value)
183+ var callback = CallBack < Boolean , Boolean >( false )
184+ isAdminCheckNav(callback)
185+ while ( ! callback.getStatus()) {
186+ // Log.d("TAG", "onStart: waiting for callback")
187+ }
188+ if (isAdminState) {
189+ Navigation (auth = auth, Screen . AdminAnalyticsMenuScreen .route )
190+ } else {
191+ Navigation (auth = auth, Screen . SwipeScreen .route )
192+ }
193193
194- this .window.statusBarColor = Color (0xFFD7C488 ).toArgb()
195- this .window.navigationBarColor = Color (0xFFD7C488 ).toArgb()
196194
197- var callback = CallBack <Boolean , Boolean >(false )
198- isAdminCheckNav(callback)
199- while (! callback.getStatus()) {
200- // Log.d("TAG", "onStart: waiting for callback")
201- }
202- if (isAdminState) {
203- Navigation (auth = auth, Screen .AdminAnalyticsMenuScreen .route)
204- } else {
205- Navigation (auth = auth, Screen .SwipeScreen .route)
206- }
195+ } else {
207196
208- }
209- } else {
210- setContent {
211- // val users = produceState<List<PostResponse>>(
212- // initialValue = emptyList() ,
213- // producer = {
214- // value = service.getUsers()
215- // }
216- // )
217- // println(users.value)
218- this .window.statusBarColor = Color (0xFFD7C488 ).toArgb()
219- this .window.navigationBarColor = Color (0xFFD7C488 ).toArgb()
220- Navigation (auth = auth)
221- }
197+ this .window.statusBarColor = Color (0xFFD7C488 ).toArgb()
198+ this .window.navigationBarColor = Color (0xFFD7C488 ).toArgb()
199+ Navigation (auth = auth, Screen .LoginScreen .route)
222200
223- }
224201
225- setContent {
226- Navigation (auth = auth, Screen .LoginScreen .route)
202+ }
227203 }
228204
229205
0 commit comments