feat: Prevent immediate reload from DB after profile updates for better async handling

This commit is contained in:
k1ngsterr1
2026-01-22 00:51:37 +05:00
parent 7cdd43402d
commit fa7e88e5b6

View File

@@ -716,7 +716,8 @@ fun MainScreen(
// 3. This callback updates UI state immediately // 3. This callback updates UI state immediately
accountName = name accountName = name
accountUsername = username accountUsername = username
reloadTrigger++ // Don't reload from DB immediately - it's async and may not be ready yet
// The values are already updated above and DB is updated in ProfileScreen
Log.d("MainActivity", "Profile saved: name=$name, username=$username, UI updated") Log.d("MainActivity", "Profile saved: name=$name, username=$username, UI updated")
}, },
onLogout = onLogout, onLogout = onLogout,