fix: restore UI state after closing default sort bottom sheet in community detail (#80)
This commit is contained in:
parent
129d4caf33
commit
2996c3ea96
@ -1601,12 +1601,14 @@ class CommunityDetailScreen(
|
|||||||
values = uiState.availableSortTypes,
|
values = uiState.availableSortTypes,
|
||||||
expandTop = true,
|
expandTop = true,
|
||||||
onSelected = { value ->
|
onSelected = { value ->
|
||||||
|
val wasDefaultSortBottomSheetOpened = defaultSortBottomSheetOpened
|
||||||
sortBottomSheetOpened = false
|
sortBottomSheetOpened = false
|
||||||
|
defaultSortBottomSheetOpened = false
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
notificationCenter.send(
|
notificationCenter.send(
|
||||||
NotificationCenterEvent.ChangeSortType(
|
NotificationCenterEvent.ChangeSortType(
|
||||||
value = value,
|
value = value,
|
||||||
defaultForCommunity = defaultSortBottomSheetOpened,
|
defaultForCommunity = wasDefaultSortBottomSheetOpened,
|
||||||
screenKey = uiState.community.readableHandle,
|
screenKey = uiState.community.readableHandle,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user