remove un-needed backup buttons
- Commit
df2edbb04c3d761b13b72101dd0bb39f47466474- Author
- vayun-mathur <[email protected]>
- When
- 2026-10-06 23:23 UTC (2 months ago)
- Parents
e1b86f9
Diff
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.ktindex 86234225c5..fa1e1370eb 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainFabOverlay.kt@@ -124,7 +124,6 @@ import com.vayunmathur.findfamily.util.PersonActions import com.vayunmathur.findfamily.util.PersonUiState import com.vayunmathur.findfamily.util.Platform import com.vayunmathur.findfamily.util.UwbSessionManager-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.map.GeoPoint import com.vayunmathur.library.map.rememberCameraState import com.vayunmathur.library.util.NavBackStack
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainMapSlot.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainMapSlot.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainMapSlot.ktindex 978e113574..3f3001599d 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainMapSlot.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainMapSlot.kt@@ -123,7 +123,6 @@ import com.vayunmathur.findfamily.util.PersonActions import com.vayunmathur.findfamily.util.PersonUiState import com.vayunmathur.findfamily.util.Platform import com.vayunmathur.findfamily.util.UwbSessionManager-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.map.GeoPoint import com.vayunmathur.library.map.CameraState import com.vayunmathur.library.map.rememberCameraState
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.ktindex 27daf6dbf0..cde981d739 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPage.kt@@ -69,7 +69,6 @@ import com.vayunmathur.library.ui.rememberBottomSheetScaffoldState import com.vayunmathur.library.ui.rememberMessenger import com.vayunmathur.library.ui.rememberPermissionRequest import com.vayunmathur.library.ui.rememberSliderState-import com.vayunmathur.library.room.SqlCipherDbCodec import com.vayunmathur.findfamily.ui.dialogs.interactionSourceClickable import kotlin.time.Duration import kotlin.time.Duration.Companion.days@@ -123,7 +122,6 @@ import com.vayunmathur.findfamily.util.PersonActions import com.vayunmathur.findfamily.util.PersonUiState import com.vayunmathur.findfamily.util.Platform import com.vayunmathur.findfamily.util.UwbSessionManager-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.map.GeoPoint import com.vayunmathur.library.map.rememberCameraState import com.vayunmathur.library.util.NavBackStack@@ -280,13 +278,6 @@ fun MainPage( familyActions = familyActions, personActions = personActions, actions = mainActions,- backupButtons = {- BackupButtons(- dbConfigs = listOf("passwords-db" to ffViewModel.backupPassphrase),- dbCodec = SqlCipherDbCodec,- extraFiles = emptyList()- )- }, historyScrubber = { if (historyMode) { HistoryScrubber(
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.ktindex a6366ac8d4..7cf16b854e 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt@@ -123,7 +123,6 @@ import com.vayunmathur.findfamily.util.PersonActions import com.vayunmathur.findfamily.util.PersonUiState import com.vayunmathur.findfamily.util.Platform import com.vayunmathur.findfamily.util.UwbSessionManager-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.map.GeoPoint import com.vayunmathur.library.map.rememberCameraState import com.vayunmathur.library.util.NavBackStack
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.ktindex 1f234064b6..5a80befca4 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt@@ -40,7 +40,6 @@ fun MainPageContent( personActions: PersonActions, actions: MainPageActions, map: @Composable () -> Unit,- backupButtons: @Composable () -> Unit = {}, historyScrubber: @Composable BoxScope.() -> Unit = {}, ) { val scaffoldState = rememberBottomSheetScaffoldState()@@ -161,7 +160,7 @@ fun MainPageContent( // light, whatever the app's theme. Box(Modifier.align(Alignment.TopCenter).fillMaxWidth()) { MaterialTheme(colorScheme = lightScheme) {- MapOverlayBar(state, actions, backupButtons)+ MapOverlayBar(state, actions) } }
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageEffects.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageEffects.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageEffects.ktindex 3bf79fcbc3..8cea61cb6f 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageEffects.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageEffects.kt@@ -123,7 +123,6 @@ import com.vayunmathur.findfamily.util.PersonActions import com.vayunmathur.findfamily.util.PersonUiState import com.vayunmathur.findfamily.util.Platform import com.vayunmathur.findfamily.util.UwbSessionManager-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.map.GeoPoint import com.vayunmathur.library.map.CameraState import com.vayunmathur.library.map.rememberCameraState
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.ktindex e9443b847e..f8ac97ff27 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageOverlays.kt@@ -1,19 +1,15 @@ package com.vayunmathur.findfamily.ui import androidx.compose.foundation.Image-import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.padding import com.vayunmathur.library.ui.Card import com.vayunmathur.library.ui.MaterialTheme-import com.vayunmathur.library.ui.DropdownMenu import com.vayunmathur.library.ui.Text import com.vayunmathur.library.ui.OverlayAction import com.vayunmathur.library.ui.Spacing import com.vayunmathur.library.ui.TopAppBarOverlay import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue-import androidx.compose.runtime.mutableStateOf-import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource@@ -23,7 +19,6 @@ import com.vayunmathur.findfamily.R import com.vayunmathur.findfamily.util.MainPageActions import com.vayunmathur.findfamily.util.MainPageUiState import com.vayunmathur.library.ui.IconDelete-import com.vayunmathur.library.ui.IconMoreVert import com.vayunmathur.library.ui.IconNavigationArrow import com.vayunmathur.library.ui.IconVerify @@ -31,12 +26,9 @@ import com.vayunmathur.library.ui.IconVerify internal fun MapOverlayBar( state: MainPageUiState, actions: MainPageActions,- backupButtons: @Composable () -> Unit, ) {- var menuExpanded by remember { mutableStateOf(false) } val gpsWarningDescription = stringResource(R.string.gps_fallback_warning_content_description)- val menuDescription = stringResource(R.string.map_menu_content_description) val findNearbyDescription = stringResource(R.string.find_nearby_content_description) val verifyDescription = stringResource(R.string.verify_security_code_content_description) val deletePersonDescription = stringResource(R.string.delete_person_content_description)@@ -61,18 +53,7 @@ internal fun MapOverlayBar( contentDescription = gpsWarningDescription, onClick = { actions.onGpsWarningClick() } )- } else null,- OverlayAction(- icon = {- IconMoreVert()- // Anchored to the button's own content so the menu drops from it.- DropdownMenu(menuExpanded, { menuExpanded = false }) {- Row(Modifier.padding(horizontal = Spacing.xs)) { backupButtons() }- }- },- contentDescription = menuDescription,- onClick = { menuExpanded = !menuExpanded }- )+ } else null ) } else if (selectedUserId != null && !state.historyMode) { if (state.isSelfSelected) emptyList() else listOfNotNull(
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainSheetContent.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainSheetContent.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainSheetContent.ktindex c217de06b1..a9287073a3 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainSheetContent.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainSheetContent.kt@@ -123,7 +123,6 @@ import com.vayunmathur.findfamily.util.PersonActions import com.vayunmathur.findfamily.util.PersonUiState import com.vayunmathur.findfamily.util.Platform import com.vayunmathur.findfamily.util.UwbSessionManager-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.map.GeoPoint import com.vayunmathur.library.map.rememberCameraState import com.vayunmathur.library.util.NavBackStack
flashcards/src/main/java/com/vayunmathur/flashcards/ui/DeckListPage.kt
diff --git a/flashcards/src/main/java/com/vayunmathur/flashcards/ui/DeckListPage.kt b/flashcards/src/main/java/com/vayunmathur/flashcards/ui/DeckListPage.ktindex 675f01b95b..7b0c25d6fa 100644--- a/flashcards/src/main/java/com/vayunmathur/flashcards/ui/DeckListPage.kt+++ b/flashcards/src/main/java/com/vayunmathur/flashcards/ui/DeckListPage.kt@@ -3,7 +3,6 @@ package com.vayunmathur.flashcards.ui import androidx.activity.compose.BackHandler import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.combinedClickable-import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth@@ -20,7 +19,6 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.graphicsLayer-import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex@@ -29,7 +27,6 @@ import com.vayunmathur.flashcards.R import com.vayunmathur.library.ui.R as UiR import com.vayunmathur.flashcards.Route import com.vayunmathur.flashcards.data.Deck-import com.vayunmathur.flashcards.data.flashcardsDbConfigs import com.vayunmathur.flashcards.util.DeckListActions import com.vayunmathur.flashcards.util.DeckListUiState import com.vayunmathur.flashcards.util.DeckSummary@@ -37,10 +34,8 @@ import com.vayunmathur.flashcards.util.FlashcardsViewModel import com.vayunmathur.flashcards.util.addDeckImpl import com.vayunmathur.flashcards.util.deleteDeckImpl import com.vayunmathur.flashcards.util.reorderDecksImpl-import com.vayunmathur.library.room.SqlCipherDbCodec import com.vayunmathur.library.ui.AlertDialog import com.vayunmathur.library.ui.AppScaffold-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.ui.ConfirmDialog import com.vayunmathur.library.ui.EmptyState import com.vayunmathur.library.ui.FloatingActionButton@@ -66,7 +61,6 @@ import kotlin.math.roundToInt /** Binds [FlashcardsViewModel] and the nav back stack to the stateless [DeckListScreen]. */ @Composable fun DeckListPage(backStack: NavBackStack<Route>, viewModel: FlashcardsViewModel) {- val context = LocalContext.current val decks by viewModel.decks.collectAsStateWithLifecycle() val cards by viewModel.cards.collectAsStateWithLifecycle() @@ -100,13 +94,6 @@ fun DeckListPage(backStack: NavBackStack<Route>, viewModel: FlashcardsViewModel) DeckListScreen( state = DeckListUiState(decks = summaries), actions = actions,- backupButtons = {- BackupButtons(- dbConfigs = remember { flashcardsDbConfigs(context) },- dbCodec = SqlCipherDbCodec,- extraFiles = emptyList(),- )- }, ) } @@ -120,8 +107,6 @@ fun DeckListPage(backStack: NavBackStack<Route>, viewModel: FlashcardsViewModel) fun DeckListScreen( state: DeckListUiState, actions: DeckListActions,- /** Top-bar backup/restore buttons; empty in a preview, which has no database. */- backupButtons: @Composable RowScope.() -> Unit = {}, ) { var showAddDialog by remember { mutableStateOf(false) } var pendingDelete by remember { mutableStateOf<Deck?>(null) }@@ -147,7 +132,6 @@ fun DeckListScreen( AppScaffold( title = stringResource(R.string.app_name),- actions = backupButtons, floatingActionButton = { FloatingActionButton(onClick = { showAddDialog = true }) { IconAdd() } },
games/alchemist/src/main/java/com/vayunmathur/games/alchemist/Navigation.kt
diff --git a/games/alchemist/src/main/java/com/vayunmathur/games/alchemist/Navigation.kt b/games/alchemist/src/main/java/com/vayunmathur/games/alchemist/Navigation.ktindex 41b035d89e..3e1006cb41 100644--- a/games/alchemist/src/main/java/com/vayunmathur/games/alchemist/Navigation.kt+++ b/games/alchemist/src/main/java/com/vayunmathur/games/alchemist/Navigation.kt@@ -15,7 +15,6 @@ import androidx.compose.ui.platform.LocalContext import com.vayunmathur.games.alchemist.data.AlchemyItem import com.vayunmathur.games.alchemist.platform.AlchemistAchievementsManager import com.vayunmathur.games.alchemist.platform.AlchemistViewModel-import com.vayunmathur.games.alchemist.platform.AppBackupAgent import com.vayunmathur.games.alchemist.ui.CollectionPage import com.vayunmathur.games.alchemist.ui.HomePage import com.vayunmathur.games.alchemist.ui.ItemDetailsPage@@ -74,7 +73,6 @@ fun Navigation(viewModel: AlchemistViewModel) { entry<Route.GameCenter> { achievementsManager?.let { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = it, onBack = { backStack.pop() }, )
games/arrows/src/main/java/com/vayunmathur/games/arrows/Navigation.kt
diff --git a/games/arrows/src/main/java/com/vayunmathur/games/arrows/Navigation.kt b/games/arrows/src/main/java/com/vayunmathur/games/arrows/Navigation.ktindex e62113074a..dca9608d81 100644--- a/games/arrows/src/main/java/com/vayunmathur/games/arrows/Navigation.kt+++ b/games/arrows/src/main/java/com/vayunmathur/games/arrows/Navigation.kt@@ -6,7 +6,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier-import com.vayunmathur.games.arrows.platform.AppBackupAgent import com.vayunmathur.games.arrows.platform.ArrowsViewModel import com.vayunmathur.games.arrows.ui.ArrowsGamePage import com.vayunmathur.games.arrows.ui.SettingsPage@@ -30,7 +29,6 @@ fun Navigation(viewModel: ArrowsViewModel) { entry<Route.Game>(metadata = FullscreenPage()) { ArrowsGamePage(backStack, viewModel) } entry<Route.GameCenter> { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = viewModel.achievementsManager, onBack = { backStack.pop() }, )
games/arrows/src/main/java/com/vayunmathur/games/arrows/ui/SettingsPage.kt
diff --git a/games/arrows/src/main/java/com/vayunmathur/games/arrows/ui/SettingsPage.kt b/games/arrows/src/main/java/com/vayunmathur/games/arrows/ui/SettingsPage.ktindex fb39947d1d..419670da81 100644--- a/games/arrows/src/main/java/com/vayunmathur/games/arrows/ui/SettingsPage.kt+++ b/games/arrows/src/main/java/com/vayunmathur/games/arrows/ui/SettingsPage.kt@@ -10,7 +10,6 @@ import com.vayunmathur.games.arrows.R import com.vayunmathur.games.arrows.platform.ArrowsViewModel import com.vayunmathur.games.arrows.platform.SettingsActions import com.vayunmathur.games.arrows.platform.SettingsUiState-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.ui.DailyReminderSettingsSection import com.vayunmathur.library.ui.DetailScaffold import com.vayunmathur.library.ui.ExperimentalMaterial3Api@@ -59,9 +58,6 @@ fun SettingsScreen(state: SettingsUiState, actions: SettingsActions, onBack: () DetailScaffold( title = stringResource(UiR.string.settings), onNavigateBack = onBack,- actions = {- BackupButtons(datastoreNames = listOf("settings", "datastore_default"))- }, scrollBehavior = appBarScrollBehavior(), ) { SettingsSection {
games/chess/src/main/java/com/vayunmathur/games/chess/MainActivity.kt
diff --git a/games/chess/src/main/java/com/vayunmathur/games/chess/MainActivity.kt b/games/chess/src/main/java/com/vayunmathur/games/chess/MainActivity.ktindex 16b19e454b..be7f7551bb 100644--- a/games/chess/src/main/java/com/vayunmathur/games/chess/MainActivity.kt+++ b/games/chess/src/main/java/com/vayunmathur/games/chess/MainActivity.kt@@ -17,7 +17,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.lifecycle.viewmodel.compose.viewModel-import com.vayunmathur.games.chess.util.AppBackupAgent import com.vayunmathur.games.chess.util.ChessViewModel import com.vayunmathur.games.chess.util.LearnViewModel import com.vayunmathur.games.chess.util.PuzzleViewModel@@ -94,7 +93,6 @@ class MainActivity : ComponentActivity() { } entry<Route.GameCenter> { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = achievementsManager, onBack = { backStack.pop() } )
games/hub/src/main/java/com/vayunmathur/games/hub/MainActivity.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/MainActivity.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/MainActivity.ktindex 639a98c48f..525463c6f0 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/MainActivity.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/MainActivity.kt@@ -22,7 +22,6 @@ import com.vayunmathur.library.ui.IconSportsEsports import com.vayunmathur.library.ui.PagerTab import com.vayunmathur.library.ui.TabStyle import com.vayunmathur.library.ui.TabbedPagerScaffold-import com.vayunmathur.games.hub.data.DB_NAME import com.vayunmathur.games.hub.data.GamesHubRepository import com.vayunmathur.games.hub.ui.screens.AchievementsScreen import com.vayunmathur.games.hub.ui.screens.ActivityFeedScreen@@ -34,7 +33,6 @@ import com.vayunmathur.games.hub.ui.screens.SettingsScreen import com.vayunmathur.games.hub.viewmodel.GameHubViewModel import com.vayunmathur.games.hub.viewmodel.GameHubViewModelFactory import com.vayunmathur.library.ui.DynamicTheme-import com.vayunmathur.library.util.DatabaseHelper import com.vayunmathur.library.util.ListDetailPage import com.vayunmathur.library.util.ListPage import com.vayunmathur.library.util.MainNavigation@@ -47,8 +45,6 @@ import kotlinx.serialization.Serializable class MainActivity : ComponentActivity() { - private var dbConfigs: List<Pair<String, String>> = emptyList()- override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) enableEdgeToEdge()@@ -56,12 +52,6 @@ class MainActivity : ComponentActivity() { var ready by mutableStateOf(false) val repository = GamesHubRepository.get(application)- dbConfigs = try {- val pass = DatabaseHelper(this).getPassphrase()- listOf(DB_NAME to pass)- } catch (_: Exception) {- emptyList()- } val factory = GameHubViewModelFactory(application, repository) val vm: GameHubViewModel by viewModels { factory } @@ -70,7 +60,7 @@ class MainActivity : ComponentActivity() { setContent { DynamicTheme { if (ready) {- HubNavigation(vm, dbConfigs)+ HubNavigation(vm) } else { Box(Modifier.fillMaxSize()) }@@ -90,14 +80,13 @@ sealed interface MainRoute : NavKey { @Composable fun HubNavigation(- viewModel: GameHubViewModel,- dbConfigs: List<Pair<String, String>>+ viewModel: GameHubViewModel ) { val backStack = rememberNavBackStack<MainRoute>(MainRoute.Main) MainNavigation(backStack) { entry<MainRoute.Main>(metadata = ListPage()) {- HubTabs(viewModel = viewModel, backStack = backStack, dbConfigs = dbConfigs)+ HubTabs(viewModel = viewModel, backStack = backStack) } entry<MainRoute.GameDetail>(metadata = ListDetailPage() + MorphPage()) { route -> GameDetailScreen(@@ -119,9 +108,7 @@ fun HubNavigation( entry<MainRoute.Settings> { SettingsScreen( viewModel = viewModel,- backStack = backStack,- dbConfigs = dbConfigs,- datastoreNames = listOf("datastore_default")+ backStack = backStack ) } }@@ -131,7 +118,6 @@ fun HubNavigation( private fun HubTabs( viewModel: GameHubViewModel, backStack: NavBackStack<MainRoute>,- dbConfigs: List<Pair<String, String>>, ) { val pagerState = rememberPagerState(pageCount = { 4 }) val scope = rememberCoroutineScope()@@ -148,9 +134,7 @@ private fun HubTabs( onProfileClick = { scope.launch { pagerState.animateScrollToPage(3) } }, onActivityClick = { backStack.add(MainRoute.Activity) }, onGamesClick = { scope.launch { pagerState.animateScrollToPage(1) } },- ownsGameMorphKeys = pagerState.settledPage == 0,- dbConfigs = dbConfigs,- datastoreNames = listOf("datastore_default")+ ownsGameMorphKeys = pagerState.settledPage == 0 ) }, PagerTab("Games", { IconSportsEsports() }) {
games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/DashboardPage.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/DashboardPage.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/DashboardPage.ktindex cc25125de6..cfe083eb38 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/DashboardPage.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/DashboardPage.kt@@ -12,7 +12,6 @@ import com.vayunmathur.games.hub.util.DashboardActions import com.vayunmathur.games.hub.util.DashboardUiState import com.vayunmathur.games.hub.util.GameIconResolver import com.vayunmathur.games.hub.viewmodel.GameHubViewModel-import com.vayunmathur.library.ui.BackupButtons /** Binds [GameHubViewModel] to the stateless [DashboardScreen]. */ @Composable@@ -22,8 +21,6 @@ fun DashboardPage( onProfileClick: () -> Unit, onActivityClick: () -> Unit, onGamesClick: () -> Unit,- dbConfigs: List<Pair<String, String>>,- datastoreNames: List<String>, modifier: Modifier = Modifier, ownsGameMorphKeys: Boolean = true ) {@@ -81,7 +78,6 @@ fun DashboardPage( override fun playGame(game: HubGameEntity) = launchGame(context, game) }, iconFor = { game -> iconCache.getOrPut(game.packageName) { GameIconResolver.resolveAppIcon(context, game.packageName) } },- topBarActions = { BackupButtons(dbConfigs = dbConfigs, datastoreNames = datastoreNames) }, ownsGameMorphKeys = ownsGameMorphKeys, modifier = modifier, )
games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/SettingsScreen.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/SettingsScreen.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/SettingsScreen.ktindex 39d04fcdb1..bcd7ca541c 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/SettingsScreen.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/ui/screens/SettingsScreen.kt@@ -3,7 +3,6 @@ package com.vayunmathur.games.hub.ui.screens import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues-import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding@@ -21,7 +20,6 @@ import com.vayunmathur.games.hub.viewmodel.GameHubViewModel import com.vayunmathur.library.ui.R as UiR import com.vayunmathur.library.ui.AppScaffold import com.vayunmathur.library.ui.AlertDialog-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.ui.Button import com.vayunmathur.library.ui.IconNavigation import com.vayunmathur.library.ui.MaterialTheme@@ -38,8 +36,6 @@ import com.vayunmathur.games.hub.R fun SettingsScreen( viewModel: GameHubViewModel, backStack: NavBackStack<MainRoute>,- dbConfigs: List<Pair<String, String>>,- datastoreNames: List<String>, modifier: Modifier = Modifier ) { var showClearConfirm by remember { mutableStateOf(false) }@@ -50,13 +46,6 @@ fun SettingsScreen( scrollBehavior = appBarScrollBehavior(), ) { padding -> LazyColumn(modifier = modifier.fillMaxSize().padding(padding), contentPadding = PaddingValues(16.dp), verticalArrangement = Arrangement.spacedBy(16.dp)) {- item {- Text(stringResource(R.string.backup_restore), style = MaterialTheme.typography.titleMedium)- Row(horizontalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.padding(top = 8.dp)) {- BackupButtons(dbConfigs = dbConfigs, datastoreNames = datastoreNames)- }- }- item { HorizontalDivider() } item { Text(stringResource(R.string.data), style = MaterialTheme.typography.titleMedium) Column(verticalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.padding(top = 8.dp)) {
games/logicgate/src/main/java/com/vayunmathur/games/logicgate/Navigation.kt
diff --git a/games/logicgate/src/main/java/com/vayunmathur/games/logicgate/Navigation.kt b/games/logicgate/src/main/java/com/vayunmathur/games/logicgate/Navigation.ktindex 8acdcf49c5..58f6a49737 100644--- a/games/logicgate/src/main/java/com/vayunmathur/games/logicgate/Navigation.kt+++ b/games/logicgate/src/main/java/com/vayunmathur/games/logicgate/Navigation.kt@@ -6,7 +6,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier-import com.vayunmathur.games.logicgate.platform.AppBackupAgent import com.vayunmathur.games.logicgate.platform.LogicViewModel import com.vayunmathur.games.logicgate.ui.GamePage import com.vayunmathur.games.logicgate.ui.ProgressionPage@@ -26,7 +25,6 @@ fun Navigation(viewModel: LogicViewModel) { entry<Route.Game>(metadata = FullscreenPage()) { GamePage(backStack, viewModel, it.levelId) } entry<Route.GameCenter> { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = viewModel.achievementsManager, onBack = { backStack.pop() } )
games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/Navigation.kt
diff --git a/games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/Navigation.kt b/games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/Navigation.ktindex 90d43a4462..1ebea23775 100644--- a/games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/Navigation.kt+++ b/games/minesweeper/src/main/java/com/vayunmathur/games/minesweeper/Navigation.kt@@ -6,7 +6,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier-import com.vayunmathur.games.minesweeper.platform.AppBackupAgent import com.vayunmathur.games.minesweeper.platform.MinesweeperViewModel import com.vayunmathur.games.minesweeper.ui.GameScreen import com.vayunmathur.games.minesweeper.ui.HomeScreen@@ -28,7 +27,6 @@ fun Navigation(viewModel: MinesweeperViewModel) { entry<Route.Game>(metadata = FullscreenPage()) { GameScreen(backStack, viewModel, it.config) } entry<Route.GameCenter> { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = viewModel.achievementsManager, onBack = { backStack.pop() }, )
games/nonogram/src/main/java/com/vayunmathur/games/nonogram/Navigation.kt
diff --git a/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/Navigation.kt b/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/Navigation.ktindex 7725fcc5d0..d280c57535 100644--- a/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/Navigation.kt+++ b/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/Navigation.kt@@ -6,7 +6,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier-import com.vayunmathur.games.nonogram.platform.AppBackupAgent import com.vayunmathur.games.nonogram.platform.NonogramViewModel import com.vayunmathur.games.nonogram.ui.NonogramGamePage import com.vayunmathur.games.nonogram.ui.SettingsPage@@ -30,7 +29,6 @@ fun Navigation(viewModel: NonogramViewModel) { entry<Route.Game>(metadata = FullscreenPage()) { NonogramGamePage(backStack, viewModel) } entry<Route.GameCenter> { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = viewModel.achievementsManager, onBack = { backStack.pop() }, )
games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.kt
diff --git a/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.kt b/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.ktindex 3405a81ba1..a1a2dae209 100644--- a/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.kt+++ b/games/nonogram/src/main/java/com/vayunmathur/games/nonogram/ui/SettingsPage.kt@@ -9,7 +9,6 @@ import androidx.compose.ui.res.stringResource import com.vayunmathur.games.nonogram.platform.NonogramViewModel import com.vayunmathur.games.nonogram.platform.SettingsActions import com.vayunmathur.games.nonogram.platform.SettingsUiState-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.ui.DailyReminderSettingsSection import com.vayunmathur.library.ui.DetailScaffold import com.vayunmathur.library.ui.ExperimentalMaterial3Api@@ -53,9 +52,6 @@ fun SettingsScreen(state: SettingsUiState, actions: SettingsActions, onBack: () DetailScaffold( title = stringResource(UiR.string.settings), onNavigateBack = onBack,- actions = {- BackupButtons(datastoreNames = listOf("settings", "datastore_default"))- }, scrollBehavior = appBarScrollBehavior(), ) { DailyReminderSettingsSection(
games/pipes/src/main/java/com/vayunmathur/games/pipes/Navigation.kt
diff --git a/games/pipes/src/main/java/com/vayunmathur/games/pipes/Navigation.kt b/games/pipes/src/main/java/com/vayunmathur/games/pipes/Navigation.ktindex fb0c662a9e..0ad99ff4bb 100644--- a/games/pipes/src/main/java/com/vayunmathur/games/pipes/Navigation.kt+++ b/games/pipes/src/main/java/com/vayunmathur/games/pipes/Navigation.kt@@ -6,7 +6,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier-import com.vayunmathur.games.pipes.platform.AppBackupAgent import com.vayunmathur.games.pipes.platform.PipesViewModel import com.vayunmathur.games.pipes.ui.DailyLevelScreen import com.vayunmathur.games.pipes.ui.GameScreen@@ -46,7 +45,6 @@ fun Navigation(viewModel: PipesViewModel) { } entry<Route.GameCenter> { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = viewModel.achievementsManager, onBack = { backStack.pop() }, )
games/solitaire/src/main/java/com/vayunmathur/games/solitaire/Navigation.kt
diff --git a/games/solitaire/src/main/java/com/vayunmathur/games/solitaire/Navigation.kt b/games/solitaire/src/main/java/com/vayunmathur/games/solitaire/Navigation.ktindex dfcc307dd3..1320807e6d 100644--- a/games/solitaire/src/main/java/com/vayunmathur/games/solitaire/Navigation.kt+++ b/games/solitaire/src/main/java/com/vayunmathur/games/solitaire/Navigation.kt@@ -7,7 +7,6 @@ import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier-import com.vayunmathur.games.solitaire.platform.AppBackupAgent import com.vayunmathur.games.solitaire.platform.SolitaireViewModel import com.vayunmathur.games.solitaire.ui.GameScreen import com.vayunmathur.games.solitaire.ui.HomeScreen@@ -33,7 +32,6 @@ fun Navigation(viewModel: SolitaireViewModel) { entry<Route.Game>(metadata = FullscreenPage()) { GameScreen(backStack, viewModel, it.mode) } entry<Route.GameCenter> { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = viewModel.achievementsManager, onBack = { backStack.pop() }, )
games/sudoku/src/main/java/com/vayunmathur/games/sudoku/Navigation.kt
diff --git a/games/sudoku/src/main/java/com/vayunmathur/games/sudoku/Navigation.kt b/games/sudoku/src/main/java/com/vayunmathur/games/sudoku/Navigation.ktindex 0747c28c57..b25f926191 100644--- a/games/sudoku/src/main/java/com/vayunmathur/games/sudoku/Navigation.kt+++ b/games/sudoku/src/main/java/com/vayunmathur/games/sudoku/Navigation.kt@@ -6,7 +6,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier-import com.vayunmathur.games.sudoku.platform.AppBackupAgent import com.vayunmathur.games.sudoku.platform.SudokuViewModel import com.vayunmathur.games.sudoku.ui.GameScreen import com.vayunmathur.games.sudoku.ui.HomeScreen@@ -28,7 +27,6 @@ fun Navigation(viewModel: SudokuViewModel) { entry<Route.Game>(metadata = FullscreenPage()) { GameScreen(backStack, viewModel, it.config) } entry<Route.GameCenter> { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = viewModel.achievementsManager, onBack = { backStack.pop() }, )
games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/Navigation.kt
diff --git a/games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/Navigation.kt b/games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/Navigation.ktindex ce3b1e55ab..0de9064db0 100644--- a/games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/Navigation.kt+++ b/games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/Navigation.kt@@ -43,7 +43,6 @@ import com.vayunmathur.games.unblockjam.data.Block import com.vayunmathur.games.unblockjam.data.DailyLevelGenerator import com.vayunmathur.games.unblockjam.data.LevelData import com.vayunmathur.games.unblockjam.data.LevelPack-import com.vayunmathur.games.unblockjam.platform.AppBackupAgent import com.vayunmathur.games.unblockjam.platform.DailyProgress import com.vayunmathur.games.unblockjam.platform.GameActions import com.vayunmathur.games.unblockjam.platform.GameUiState@@ -123,7 +122,6 @@ fun Navigation(viewModel: UnblockJamViewModel) { } entry<Route.GameCenter> { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = viewModel.achievementsManager, onBack = { backStack.pop() } )
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/Navigation.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/Navigation.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/Navigation.ktindex cbd88db4c6..ce7a4016fa 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/Navigation.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/Navigation.kt@@ -4,7 +4,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.produceState import androidx.compose.ui.platform.LocalContext import com.vayunmathur.games.wordmaker.data.LevelDataStore-import com.vayunmathur.games.wordmaker.platform.AppBackupAgent import com.vayunmathur.games.wordmaker.platform.WordMakerAchievementsManager import com.vayunmathur.games.wordmaker.platform.WordMakerViewModel import com.vayunmathur.games.wordmaker.ui.SettingsPage@@ -32,7 +31,6 @@ fun Navigation(viewModel: WordMakerViewModel) { val achievementsManager = rememberAchievementsManager(viewModel.levelDataStore) if (achievementsManager != null) { GameCenterScreen(- backupAgent = AppBackupAgent(), manager = achievementsManager, onBack = { backStack.pop() }, )
games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/SettingsPage.kt
diff --git a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/SettingsPage.kt b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/SettingsPage.ktindex d0635b7220..9644de6333 100644--- a/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/SettingsPage.kt+++ b/games/wordmaker/src/main/java/com/vayunmathur/games/wordmaker/ui/SettingsPage.kt@@ -2,7 +2,6 @@ package com.vayunmathur.games.wordmaker.ui import android.Manifest import android.os.Build import com.vayunmathur.library.ui.R as UiR-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.ui.DailyReminderSettingsSection import com.vayunmathur.library.ui.DetailScaffold import com.vayunmathur.library.ui.ExperimentalMaterial3Api@@ -66,9 +65,6 @@ fun SettingsScreen(state: SettingsUiState, actions: SettingsActions, onBack: () DetailScaffold( title = stringResource(UiR.string.settings), onNavigateBack = onBack,- actions = {- BackupButtons(datastoreNames = listOf("settings"))- }, scrollBehavior = appBarScrollBehavior(), ) { SettingsSection {
health/src/main/java/com/vayunmathur/health/ui/RecipeManagementPage.kt
diff --git a/health/src/main/java/com/vayunmathur/health/ui/RecipeManagementPage.kt b/health/src/main/java/com/vayunmathur/health/ui/RecipeManagementPage.ktindex bf55753ac0..2ab1384272 100644--- a/health/src/main/java/com/vayunmathur/health/ui/RecipeManagementPage.kt+++ b/health/src/main/java/com/vayunmathur/health/ui/RecipeManagementPage.kt@@ -60,7 +60,6 @@ import com.vayunmathur.health.util.FoodDatabase import com.vayunmathur.health.util.FoodSearchAPI import com.vayunmathur.health.util.HealthViewModel import com.vayunmathur.library.util.NavBackStack-import com.vayunmathur.library.ui.BackupButtons import kotlinx.coroutines.launch import java.text.NumberFormat @@ -89,7 +88,6 @@ fun RecipeManagementPage(backStack: NavBackStack<Route>, viewModel: HealthViewMo AppScaffold( title = stringResource(R.string.recipes), backStack = backStack,- actions = { BackupButtons() }, floatingActionButton = { if (!isListEmpty) { FloatingActionButton(onClick = {
library/ui/src/main/java/com/vayunmathur/library/ui/GameCenterScreen.kt
diff --git a/library/ui/src/main/java/com/vayunmathur/library/ui/GameCenterScreen.kt b/library/ui/src/main/java/com/vayunmathur/library/ui/GameCenterScreen.ktindex 4a035be7fc..ecab38a28f 100644--- a/library/ui/src/main/java/com/vayunmathur/library/ui/GameCenterScreen.kt+++ b/library/ui/src/main/java/com/vayunmathur/library/ui/GameCenterScreen.kt@@ -31,13 +31,11 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.vayunmathur.library.util.AchievementsManager-import com.vayunmathur.library.util.BaseBackupAgent import androidx.compose.ui.res.stringResource import com.vayunmathur.library.ui.R @Composable fun GameCenterScreen(- backupAgent: BaseBackupAgent, manager: AchievementsManager, onBack: () -> Unit ) {@@ -51,14 +49,6 @@ fun GameCenterScreen( navigationIcon = { IconNavigation(onBack) },- actions = {- BackupButtons(- dbConfigs = backupAgent.dbConfigs,- datastoreNames = backupAgent.datastoreNames,- prefNames = backupAgent.prefNames,- extraFiles = backupAgent.extraFiles- )- } ) } ) { padding ->
openassistant/src/main/java/com/vayunmathur/openassistant/ui/SettingsPage.kt
diff --git a/openassistant/src/main/java/com/vayunmathur/openassistant/ui/SettingsPage.kt b/openassistant/src/main/java/com/vayunmathur/openassistant/ui/SettingsPage.ktindex aa8942df5e..8640035038 100644--- a/openassistant/src/main/java/com/vayunmathur/openassistant/ui/SettingsPage.kt+++ b/openassistant/src/main/java/com/vayunmathur/openassistant/ui/SettingsPage.kt@@ -2,11 +2,9 @@ package com.vayunmathur.openassistant.ui import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row-import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.items-import com.vayunmathur.library.ui.BackupButtons import com.vayunmathur.library.ui.Card import com.vayunmathur.library.ui.CardDefaults import com.vayunmathur.library.ui.DetailLazyColumn@@ -32,10 +30,6 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp-import com.vayunmathur.library.ui.BackupButtons-import com.vayunmathur.library.ui.IconDelete-import com.vayunmathur.library.room.SqlCipherDbCodec-import com.vayunmathur.library.util.DatabaseHelper import com.vayunmathur.library.util.DataStoreUtils import com.vayunmathur.library.util.NavBackStack import com.vayunmathur.openassistant.R@@ -81,16 +75,6 @@ fun SettingsPage(backStack: NavBackStack<Route>, viewModel: AssistantViewModel) } } },- // Passed in rather than built inside the screen: the backup buttons need the- // database passphrase, which only exists on a real device.- backupButtons = {- val pass = remember { DatabaseHelper(context).getPassphrase() }- BackupButtons(- dbConfigs = listOf("passwords-db" to pass),- dbCodec = SqlCipherDbCodec,- extraFiles = emptyList()- )- }, ) } @@ -103,15 +87,12 @@ fun SettingsPage(backStack: NavBackStack<Route>, viewModel: AssistantViewModel) fun SettingsScreen( state: SettingsUiState, actions: SettingsActions,- /** Top-bar backup/restore buttons; empty in a preview, which has no database. */- backupButtons: @Composable RowScope.() -> Unit = {}, ) { val memories = state.memories DetailLazyColumn( title = stringResource(R.string.settings_title), onNavigateBack = { actions.back() },- actions = backupButtons, scrollBehavior = appBarScrollBehavior(), ) { item {