mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Rename auto install preference to better reflect behaviour.
Auto install preference always runs after a sync, even if it's manual. The names of the preference & strings have been updated to reflect this new behaviour.
This commit is contained in:
parent
5fbb6dcb61
commit
430b18e77b
@ -24,7 +24,7 @@ object Preferences {
|
||||
private val keys = sequenceOf(
|
||||
Key.Language,
|
||||
Key.AutoSync,
|
||||
Key.AutoSyncInstall,
|
||||
Key.InstallAfterSync,
|
||||
Key.IncompatibleVersions,
|
||||
Key.ListAnimation,
|
||||
Key.ProxyHost,
|
||||
@ -131,7 +131,7 @@ object Preferences {
|
||||
"auto_sync",
|
||||
Value.EnumerationValue(Preferences.AutoSync.Wifi)
|
||||
)
|
||||
object AutoSyncInstall :
|
||||
object InstallAfterSync :
|
||||
Key<Boolean>("auto_sync_install", Value.BooleanValue(Android.sdk(31)))
|
||||
|
||||
object IncompatibleVersions :
|
||||
|
@ -109,8 +109,8 @@ class SettingsFragment : ScreenFragment() {
|
||||
}
|
||||
}
|
||||
addSwitch(
|
||||
Preferences.Key.AutoSyncInstall, getString(R.string.sync_auto_install),
|
||||
getString(R.string.sync_auto_install_summary)
|
||||
Preferences.Key.InstallAfterSync, getString(R.string.install_after_sync),
|
||||
getString(R.string.install_after_sync_summary)
|
||||
)
|
||||
addSwitch(
|
||||
Preferences.Key.UpdateNotify, getString(R.string.notify_about_updates),
|
||||
|
@ -403,7 +403,7 @@ class SyncService : ConnectionService<SyncService.Binder>() {
|
||||
currentTask = null
|
||||
handleNextTask(false)
|
||||
if (result.isNotEmpty()) {
|
||||
if (Preferences[Preferences.Key.AutoSyncInstall])
|
||||
if (Preferences[Preferences.Key.InstallAfterSync])
|
||||
runAutoUpdate(result)
|
||||
if (hasUpdates && Preferences[Preferences.Key.UpdateNotify] &&
|
||||
updateNotificationBlockerFragment?.get()?.isAdded == true
|
||||
@ -434,7 +434,7 @@ class SyncService : ConnectionService<SyncService.Binder>() {
|
||||
* @see SyncService.displayUpdatesNotification
|
||||
*/
|
||||
private fun runAutoUpdate(productItems: List<ProductItem>) {
|
||||
if (Preferences[Preferences.Key.AutoSyncInstall]) {
|
||||
if (Preferences[Preferences.Key.InstallAfterSync]) {
|
||||
// run startUpdate on every item
|
||||
productItems.map { productItem ->
|
||||
Pair(
|
||||
|
@ -180,6 +180,6 @@
|
||||
<string name="installed_applications">Installed applications</string>
|
||||
<string name="sort_filter">Sort & Filter</string>
|
||||
<string name="new_applications">New applications</string>
|
||||
<string name="sync_auto_install">Install updates automatically</string>
|
||||
<string name="sync_auto_install_summary">Automatically install app updates after syncing repositories</string>
|
||||
<string name="install_after_sync">Install updates automatically</string>
|
||||
<string name="install_after_sync_summary">Automatically install app updates after syncing repositories</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user