Skip to content

Commit

Permalink
Remove Import button from empty item listing screen
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintPatrck committed Apr 20, 2024
1 parent af1ab4c commit c111773
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ fun NavGraphBuilder.itemListingGraph(
onNavigateToSearch = navigateToSearch,
onNavigateToQrCodeScanner = navigateToQrCodeScanner,
onNavigateToManualKeyEntry = navigateToManualKeyEntry,
onNavigateToEditItemScreen = navigateToEditItem,
onNavigateToSyncWithBitwardenScreen = {
/*navController.navigateToSyncWithBitwardenScreen()*/
},
onNavigateToImportScreen = { /*navController.navigateToImportScreen()*/ }
)
onNavigateToEditItemScreen = navigateToEditItem
) {
/*navController.navigateToSyncWithBitwardenScreen()*/
}
editItemDestination(
onNavigateBack = { navController.popBackStack() },
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ fun NavGraphBuilder.itemListingDestination(
onNavigateToManualKeyEntry: () -> Unit = { },
onNavigateToEditItemScreen: (id: String) -> Unit = { },
onNavigateToSyncWithBitwardenScreen: () -> Unit = { },
onNavigateToImportScreen: () -> Unit = { },
) {
composableWithPushTransitions(
route = ITEM_LIST_ROUTE,
Expand All @@ -26,8 +25,7 @@ fun NavGraphBuilder.itemListingDestination(
onNavigateToQrCodeScanner = onNavigateToQrCodeScanner,
onNavigateToManualKeyEntry = onNavigateToManualKeyEntry,
onNavigateToEditItemScreen = onNavigateToEditItemScreen,
onNavigateToSyncWithBitwardenScreen = onNavigateToSyncWithBitwardenScreen,
onNavigateToImportScreen = onNavigateToImportScreen
onNavigateToSyncWithBitwardenScreen = onNavigateToSyncWithBitwardenScreen
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ fun ItemListingScreen(
onNavigateToManualKeyEntry: () -> Unit,
onNavigateToEditItemScreen: (id: String) -> Unit,
onNavigateToSyncWithBitwardenScreen: () -> Unit,
onNavigateToImportScreen: () -> Unit,
) {
val state by viewModel.stateFlow.collectAsStateWithLifecycle()
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState())
Expand Down Expand Up @@ -279,7 +278,6 @@ fun ItemListingScreen(
EmptyItemListingContent(
onAddCodeClick = onNavigateToQrCodeScanner,
onSyncWithBitwardenClick = onNavigateToSyncWithBitwardenScreen,
onImportItemsClick = onNavigateToImportScreen,
)
}
}
Expand Down Expand Up @@ -338,7 +336,6 @@ fun EmptyItemListingContent(
modifier: Modifier = Modifier,
onAddCodeClick: () -> Unit = {},
onSyncWithBitwardenClick: () -> Unit = {},
onImportItemsClick: () -> Unit = {},
) {
Column(
modifier = modifier
Expand Down Expand Up @@ -380,12 +377,6 @@ fun EmptyItemListingContent(
label = stringResource(id = R.string.sync_items_with_bitwarden),
onClick = onSyncWithBitwardenClick,
)

Spacer(modifier = Modifier.height(16.dp))
BitwardenTextButton(
label = stringResource(id = R.string.import_items),
onClick = onImportItemsClick,
)
}
}

Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<string name="empty_item_list_instruction">Add a new code, sync an existing account, or import codes to secure your accounts.</string>
<string name="add_code">Add code</string>
<string name="sync_items_with_bitwarden">Sync items from Bitwarden</string>
<string name="import_items">Import items</string>
<string name="account_name">Account Name</string>
<string name="totp_code">TOTP Code</string>
<string name="type">Type</string>
Expand Down

0 comments on commit c111773

Please sign in to comment.