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() {
|
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() {
|
fun stop() {
|
||||||
|
|
Loading…
Reference in New Issue