Skip to content

Commit 3536960

Browse files
committed
Always go to passwords view when autofilling
1 parent 2ae49e1 commit 3536960

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • app/src/main/java/com/hegocre/nextcloudpasswords/ui/components

app/src/main/java/com/hegocre/nextcloudpasswords/ui/components/NCPNavHost.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ fun NCPNavHost(
9696
navController.navigate("${NCPScreen.Folders.name}/${folder.id}")
9797
}
9898

99-
val startDestination by PreferencesManager.getInstance(context).getStartScreen()
99+
val userStartDestination by PreferencesManager.getInstance(context).getStartScreen()
100100
.collectAsState(NCPScreen.Passwords.name, context = Dispatchers.IO)
101101

102+
val startDestination = remember(isAutofillRequest, userStartDestination) {
103+
if (isAutofillRequest) NCPScreen.Passwords.name else userStartDestination
104+
}
105+
102106
val filteredPasswordList = remember(passwordsDecryptionState.decryptedList, searchQuery) {
103107
passwordsDecryptionState.decryptedList?.filter {
104108
!it.hidden && !it.trashed && it.matches(searchQuery)

0 commit comments

Comments
 (0)