Fix leaving selected group
This commit is contained in:
parent
9ebf87df62
commit
c1da4aecd7
|
@ -75,6 +75,11 @@ class GroupListViewModel @AssistedInject constructor(@Assisted initialState: Gro
|
|||
}
|
||||
val optionGroup = Option.just(groupSummary)
|
||||
selectedGroupStore.post(optionGroup)
|
||||
} else {
|
||||
// If selected group is null we force to default. It can happens when leaving the selected group.
|
||||
setState {
|
||||
copy(selectedGroup = this.asyncGroups()?.find { it.groupId == ALL_COMMUNITIES_GROUP_ID })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue