Skip to content

Commit

Permalink
Fix crash when scrolling and closing search bar
Browse files Browse the repository at this point in the history
  • Loading branch information
hegocre committed Sep 7, 2024
1 parent 8080ae5 commit a48b7c6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.material3.rememberTopAppBarState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand Down Expand Up @@ -87,7 +88,10 @@ fun NextcloudPasswordsApp(

val keyboardController = LocalSoftwareKeyboardController.current

var searchExpanded by rememberSaveable { mutableStateOf(isAutofillRequest) }
var searchExpanded by rememberSaveable { mutableStateOf(false) }
LaunchedEffect(Unit) {
if (isAutofillRequest) searchExpanded = true
}
val (searchQuery, setSearchQuery) = rememberSaveable { mutableStateOf(defaultSearchQuery) }

val server = remember {
Expand Down

0 comments on commit a48b7c6

Please sign in to comment.