mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-15 15:02:49 +01:00
refactor: add group category for sync.
Adding group gives more clarity. Signed-off-by: KaiserBh <kaiserbh@proton.me>
This commit is contained in:
parent
d180d1de45
commit
b3ee510050
@ -367,15 +367,20 @@ object SettingsDataScreen : SearchableSettings {
|
|||||||
@Composable
|
@Composable
|
||||||
private fun getSyncPreferences(syncPreferences: SyncPreferences, syncService: Int): List<Preference> {
|
private fun getSyncPreferences(syncPreferences: SyncPreferences, syncService: Int): List<Preference> {
|
||||||
return listOf(
|
return listOf(
|
||||||
Preference.PreferenceItem.ListPreference(
|
Preference.PreferenceGroup(
|
||||||
pref = syncPreferences.syncService(),
|
title = stringResource(MR.strings.pref_sync_service_category),
|
||||||
title = stringResource(MR.strings.pref_sync_service),
|
preferenceItems = listOf(
|
||||||
entries = mapOf(
|
Preference.PreferenceItem.ListPreference(
|
||||||
SyncManager.SyncService.NONE.value to stringResource(MR.strings.off),
|
pref = syncPreferences.syncService(),
|
||||||
SyncManager.SyncService.SYNCYOMI.value to stringResource(MR.strings.syncyomi),
|
title = stringResource(MR.strings.pref_sync_service),
|
||||||
SyncManager.SyncService.GOOGLE_DRIVE.value to stringResource(MR.strings.google_drive),
|
entries = mapOf(
|
||||||
|
SyncManager.SyncService.NONE.value to stringResource(MR.strings.off),
|
||||||
|
SyncManager.SyncService.SYNCYOMI.value to stringResource(MR.strings.syncyomi),
|
||||||
|
SyncManager.SyncService.GOOGLE_DRIVE.value to stringResource(MR.strings.google_drive),
|
||||||
|
),
|
||||||
|
onValueChanged = { true },
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onValueChanged = { true },
|
|
||||||
),
|
),
|
||||||
) + getSyncServicePreferences(syncPreferences, syncService)
|
) + getSyncServicePreferences(syncPreferences, syncService)
|
||||||
}
|
}
|
||||||
@ -552,7 +557,7 @@ private fun getAutomaticSyncGroup(syncPreferences: SyncPreferences): Preference.
|
|||||||
val lastSync by syncPreferences.lastSyncTimestamp().collectAsState()
|
val lastSync by syncPreferences.lastSyncTimestamp().collectAsState()
|
||||||
|
|
||||||
return Preference.PreferenceGroup(
|
return Preference.PreferenceGroup(
|
||||||
title = stringResource(MR.strings.pref_sync_service_category),
|
title = stringResource(MR.strings.pref_sync_automatic_category),
|
||||||
preferenceItems = listOf(
|
preferenceItems = listOf(
|
||||||
Preference.PreferenceItem.ListPreference(
|
Preference.PreferenceItem.ListPreference(
|
||||||
pref = syncIntervalPref,
|
pref = syncIntervalPref,
|
||||||
|
@ -525,7 +525,8 @@
|
|||||||
<string name="pref_sync_confirmation_message">Syncing will overwrite your local library with the remote library. Are you sure you want to continue?</string>
|
<string name="pref_sync_confirmation_message">Syncing will overwrite your local library with the remote library. Are you sure you want to continue?</string>
|
||||||
<string name="pref_sync_service">Service</string>
|
<string name="pref_sync_service">Service</string>
|
||||||
<string name="pref_sync_service_summ">Select the service to sync your library with</string>
|
<string name="pref_sync_service_summ">Select the service to sync your library with</string>
|
||||||
<string name="pref_sync_service_category">Automatic Synchronization</string>
|
<string name="pref_sync_service_category">Sync</string>
|
||||||
|
<string name="pref_sync_automatic_category">Automatic Synchronization</string>
|
||||||
<string name="pref_sync_interval">Synchronization frequency</string>
|
<string name="pref_sync_interval">Synchronization frequency</string>
|
||||||
<string name="syncyomi">SyncYomi</string>
|
<string name="syncyomi">SyncYomi</string>
|
||||||
<string name="sync_completed_message">Done in %1$s</string>
|
<string name="sync_completed_message">Done in %1$s</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user