mirror of
https://github.com/ouchadam/small-talk.git
synced 2024-12-23 00:09:59 +01:00
make profile tab switch instant when the data is already available
This commit is contained in:
parent
4d853f0338
commit
c6b9a997f3
@ -104,7 +104,23 @@ class ProfileViewModel(
|
||||
}
|
||||
|
||||
fun reset() {
|
||||
updateState { ProfileScreenState(SpiderPage(Page.Routes.profile, "Profile", null, Page.Profile(Lce.Loading()), hasToolbar = false)) }
|
||||
when (state.page.state) {
|
||||
is Page.Invitations -> updateState {
|
||||
ProfileScreenState(
|
||||
SpiderPage(
|
||||
Page.Routes.profile,
|
||||
"Profile",
|
||||
null,
|
||||
Page.Profile(Lce.Loading()),
|
||||
hasToolbar = false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
is Page.Profile -> {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun stop() {
|
||||
|
Loading…
Reference in New Issue
Block a user