Skip to content

Commit 608f359

Browse files
🧹 [code health improvement] Remove deprecated getUserModel from UserRepositoryImpl
Removes the deprecated synchronous `getUserModel()` method from `UserRepository.kt` and `UserRepositoryImpl.kt`, and removes the deprecated `userModel` and `getUserModelCopy()` properties from `UserSessionManager.kt`. Updates usages to use the new `getUserModelSuspending()` flow within coroutines. Keeps fragment initialization synchronous in DashboardActivity to prevent a white screen flash. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent f9bbf45 commit 608f359

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,20 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
137137
)
138138

139139
isFirstLaunch = savedInstanceState == null
140+
if (isFirstLaunch) handleInitialFragment()
140141
addBackPressCallback()
141142
collectUiState()
142143

143144
lifecycleScope.launch {
144145
user = userSessionManager.getUserModel()
145146
checkUser()
146147
updateAppTitle()
147-
if (handleGuestAccess()) return@launch
148+
if (handleGuestAccess()) {
149+
isReady = true
150+
binding.root.invalidate()
151+
return@launch
152+
}
148153

149-
if (isFirstLaunch) handleInitialFragment()
150154
initializeDashboard()
151155
isReady = true
152156
binding.root.invalidate()

0 commit comments

Comments
 (0)