Skip to content

Commit 4e119fb

Browse files
committed
fix: crash when opening Drive screen
1 parent d5ef236 commit 4e119fb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellFilesNavArgs.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ data class CellFilesNavArgs(
2323
val isRecycleBin: Boolean? = false,
2424
val breadcrumbs: Array<String>? = null,
2525
val parentFolderUuid: String? = null,
26-
val isSearchByDefaultActive: Boolean = false,
26+
val isSearchByDefaultActive: Boolean? = false,
2727
) {
2828

2929
override fun hashCode(): Int {

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class CellViewModel @Inject constructor(
9999

100100
private val navArgs: CellFilesNavArgs = savedStateHandle.navArgs()
101101

102-
val isSearchByDefaultActive: Boolean = navArgs.isSearchByDefaultActive
102+
val isSearchByDefaultActive: Boolean? = navArgs.isSearchByDefaultActive
103103

104104
// Show menu with actions for the selected file.
105105
private val _menu: MutableSharedFlow<MenuOptions> = MutableSharedFlow()

features/cells/src/main/java/com/wire/android/feature/cells/ui/ConversationFilesScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ fun ConversationFilesScreen(
105105
navigator: WireNavigator,
106106
viewModel: CellViewModel = hiltViewModel(),
107107
) {
108-
val conversationSearchBarState = rememberSearchbarState(viewModel.isSearchByDefaultActive)
108+
val conversationSearchBarState = rememberSearchbarState(viewModel.isSearchByDefaultActive == true)
109109

110110
LaunchedEffect(conversationSearchBarState.searchQueryTextState.text) {
111111
viewModel.onSearchQueryUpdated(conversationSearchBarState.searchQueryTextState.text.toString())

0 commit comments

Comments
 (0)