Moves DropDown state to the IO thread.

This commit is contained in:
Vitor Pamplona
2023-04-18 08:45:34 -04:00
parent 47e2683aa3
commit 11bf702e02

View File

@@ -1110,6 +1110,7 @@ fun NoteDropDownMenu(note: Note, popupExpanded: Boolean, onDismiss: () -> Unit,
} }
LaunchedEffect(key1 = note) { LaunchedEffect(key1 = note) {
withContext(Dispatchers.IO) {
state = DropDownParams( state = DropDownParams(
accountViewModel.isFollowing(note.author), accountViewModel.isFollowing(note.author),
accountViewModel.isInPrivateBookmarks(note), accountViewModel.isInPrivateBookmarks(note),
@@ -1117,6 +1118,7 @@ fun NoteDropDownMenu(note: Note, popupExpanded: Boolean, onDismiss: () -> Unit,
accountViewModel.isLoggedUser(note.author) accountViewModel.isLoggedUser(note.author)
) )
} }
}
DropdownMenu( DropdownMenu(
expanded = popupExpanded, expanded = popupExpanded,