StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.
Kotlin iptv-player
refactor: move backup and about settings sections
David Nashash0f52133da434
diff --git a/app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsContentPane.kt b/app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsContentPane.ktindex 3b0df103..0e5f11ed 100644--- a/app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsContentPane.kt+++ b/app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsContentPane.kt@@ -11,6 +11,7 @@ import androidx.compose.foundation.lazy.LazyColumnimport androidx.compose.runtime.Composableimport androidx.compose.ui.Modifierimport androidx.compose.ui.unit.dp+import com.streamvault.app.BuildConfigimport com.streamvault.domain.model.LegacyProvider as Provider@Composable@@ -199,6 +200,7 @@ internal fun SettingsContentPane(settingsAboutSection(uiState = uiState,context = context,+ appVersionLabel = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})",buildVerificationLabel = screenLabels.buildVerificationLabel,onOpenUri = onOpenUri,onCheckForUpdates = viewModel::checkForAppUpdates,diff --git a/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsBackupAboutSections.kt b/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsBackupAboutSections.ktindex c624dce1..82594a46 100644--- a/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsBackupAboutSections.kt+++ b/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsBackupAboutSections.kt@@ -1,6 +1,4 @@-package com.streamvault.app.ui.screens.settings--import com.streamvault.feature.settings.presentation.*+package com.streamvault.feature.settings.presentationimport android.content.Contextimport androidx.compose.foundation.layout.Arrangement@@ -21,9 +19,7 @@ import androidx.compose.ui.unit.dpimport androidx.tv.material3.ClickableSurfaceDefaultsimport androidx.tv.material3.MaterialThemeimport androidx.tv.material3.Text-import com.streamvault.app.BuildConfig-import com.streamvault.app.R-import com.streamvault.app.update.AppUpdateActionState+import com.streamvault.feature.settings.Rimport com.streamvault.core.ui.interaction.TvClickableSurfaceimport com.streamvault.core.ui.theme.OnSurfaceimport com.streamvault.core.ui.theme.OnSurfaceDim@@ -31,7 +27,7 @@ import com.streamvault.core.ui.theme.Primaryimport com.streamvault.core.ui.theme.Secondaryimport com.streamvault.domain.manager.DriveAuthState-internal fun LazyListScope.settingsBackupSection(+public fun LazyListScope.settingsBackupSection(uiState: SettingsUiState,viewModel: SettingsViewModel,onCreateBackup: () -> Unit,@@ -179,7 +175,7 @@ internal fun LazyListScope.settingsBackupSection(}}-internal fun LazyListScope.settingsDriveBackupSection(+public fun LazyListScope.settingsDriveBackupSection(uiState: SettingsUiState,onSignIn: () -> Unit,onSignOut: () -> Unit,@@ -253,7 +249,7 @@ internal fun LazyListScope.settingsDriveBackupSection(}@androidx.compose.runtime.Composable-internal fun formatSnapshotDetails(snapshot: com.streamvault.domain.manager.DriveBackupSnapshot): String {+public fun formatSnapshotDetails(snapshot: com.streamvault.domain.manager.DriveBackupSnapshot): String {val date = snapshot.modifiedAtMs?.let {java.text.DateFormat.getDateTimeInstance(java.text.DateFormat.SHORT,@@ -379,9 +375,10 @@ private fun BackupActionCard(}}-internal fun LazyListScope.settingsAboutSection(+public fun LazyListScope.settingsAboutSection(uiState: SettingsUiState,context: Context,+ appVersionLabel: String,buildVerificationLabel: String,onOpenUri: (String) -> Unit,onCheckForUpdates: () -> Unit,@@ -408,7 +405,7 @@ internal fun LazyListScope.settingsAboutSection(title = stringResource(R.string.settings_updates_title),subtitle = stringResource(R.string.settings_updates_subtitle))- SettingsRow(label = stringResource(R.string.settings_app_version), value = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})")+ SettingsRow(label = stringResource(R.string.settings_app_version), value = appVersionLabel)SwitchSettingsRow(label = stringResource(R.string.settings_update_auto_check),value = stringResource(diff --git a/feature/settings/src/main/res/values/strings.xml b/feature/settings/src/main/res/values/strings.xmlindex 093db59d..76b224f2 100644--- a/feature/settings/src/main/res/values/strings.xml+++ b/feature/settings/src/main/res/values/strings.xml@@ -593,6 +593,58 @@<string name="settings_recording_empty_title">No active recordings</string><string name="settings_recording_empty_subtitle">Start a manual recording from live playback or schedule one from the player.</string><string name="settings_recording_pattern_hint">Use tokens like ChannelName, ProgramTitle, yyyy-MM-dd_HH-mm</string>+ <string name="settings_backup_subtitle">Export or import favorites, groups, and preferences.</string>+ <string name="settings_backup_data">Export Data</string>+ <string name="settings_backup_share_data">Share Backup</string>+ <string name="settings_backup_share_subtitle">Send a backup file to a TV file manager or another app.</string>+ <string name="settings_restore_data">Import Data</string>+ <string name="settings_restore_subtitle">Choose a backup file, or open a backup with StreamVault from a file manager.</string>+ <string name="settings_manage_local_backups">Manage local backups</string>+ <string name="settings_manage_local_backups_subtitle">Review and delete backups created by StreamVault.</string>+ <string name="settings_backup_usb_data">Export to USB</string>+ <string name="settings_backup_usb_subtitle">Save a backup to the connected USB drive.</string>+ <string name="settings_restore_usb_data">Import from USB</string>+ <string name="settings_restore_usb_subtitle">Restore a backup from the connected USB drive.</string>+ <string name="settings_drive_section_title">Google Drive backup</string>+ <string name="settings_drive_section_subtitle">Push and pull your StreamVault configuration to a private Drive folder.</string>+ <string name="settings_drive_signin">Sign in to Google Drive</string>+ <string name="settings_drive_signin_description">Connect a Google account to enable cloud backup.</string>+ <string name="settings_drive_push">Send to Drive</string>+ <string name="settings_drive_push_subtitle">Upload the current configuration to your Drive backup.</string>+ <string name="settings_drive_pull">Restore from Drive</string>+ <string name="settings_drive_pull_subtitle">Choose a Drive backup and preview the import.</string>+ <string name="settings_manage_drive_backups">Manage Drive backups</string>+ <string name="settings_manage_drive_backups_subtitle">Review or delete saved Drive snapshots.</string>+ <string name="settings_drive_unknown_backup_date">Date unavailable</string>+ <string name="settings_drive_backup_size_unknown">Size unavailable</string>+ <string name="settings_drive_signout">Sign out</string>+ <string name="settings_drive_never_synced">Never synced yet</string>+ <string name="settings_drive_last_push">Pushed: %1$s</string>+ <string name="settings_drive_last_pull">Pulled: %1$s</string>+ <string name="settings_updates_title">Updates</string>+ <string name="settings_updates_subtitle">Check GitHub Releases for newer StreamVault versions without leaving the app.</string>+ <string name="settings_app_version">App Version</string>+ <string name="settings_enabled">Enabled</string>+ <string name="settings_disabled">Disabled</string>+ <string name="settings_crash_reports_title">Crash Reports</string>+ <string name="settings_crash_reports_subtitle">Fatal crashes are saved locally only when the app is already crashing. You can review or share the latest report.</string>+ <string name="settings_crash_report_latest">Latest crash</string>+ <string name="settings_crash_report_exception">Exception</string>+ <string name="settings_crash_report_view">View crash report</string>+ <string name="settings_crash_report_available">Available</string>+ <string name="settings_crash_report_share">Share crash report</string>+ <string name="settings_crash_report_delete">Delete crash report</string>+ <string name="settings_crash_report_delete_value">Remove saved report</string>+ <string name="settings_crash_report_none">No crash report saved</string>+ <string name="settings_build">Build</string>+ <string name="settings_build_desc">StreamVault for Android TV</string>+ <string name="settings_build_verification">Build Verification</string>+ <string name="settings_developed_by">Developed by</string>+ <string name="settings_developer_name">David Nashash</string>+ <string name="settings_github">GitHub</string>+ <string name="settings_github_url">https://github.com/Davidona</string>+ <string name="settings_donate">Support on Ko-fi</string>+ <string name="settings_donate_url">https://ko-fi.com/davidona</string><string name="settings_speed_test_not_run">Not tested yet</string><string name="settings_speed_test_summary_default">Run a quick download test and use the result to pick stable playback quality limits.</string><string name="settings_speed_test_summary_measured">Measured on %1$s at %2$s.</string>