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,6 +367,9 @@ 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.PreferenceGroup(
|
||||||
|
title = stringResource(MR.strings.pref_sync_service_category),
|
||||||
|
preferenceItems = listOf(
|
||||||
Preference.PreferenceItem.ListPreference(
|
Preference.PreferenceItem.ListPreference(
|
||||||
pref = syncPreferences.syncService(),
|
pref = syncPreferences.syncService(),
|
||||||
title = stringResource(MR.strings.pref_sync_service),
|
title = stringResource(MR.strings.pref_sync_service),
|
||||||
@ -377,6 +380,8 @@ object SettingsDataScreen : SearchableSettings {
|
|||||||
),
|
),
|
||||||
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