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(
|
private val keys = sequenceOf(
|
||||||
Key.Language,
|
Key.Language,
|
||||||
Key.AutoSync,
|
Key.AutoSync,
|
||||||
Key.AutoSyncInstall,
|
Key.InstallAfterSync,
|
||||||
Key.IncompatibleVersions,
|
Key.IncompatibleVersions,
|
||||||
Key.ListAnimation,
|
Key.ListAnimation,
|
||||||
Key.ProxyHost,
|
Key.ProxyHost,
|
||||||
@ -131,7 +131,7 @@ object Preferences {
|
|||||||
"auto_sync",
|
"auto_sync",
|
||||||
Value.EnumerationValue(Preferences.AutoSync.Wifi)
|
Value.EnumerationValue(Preferences.AutoSync.Wifi)
|
||||||
)
|
)
|
||||||
object AutoSyncInstall :
|
object InstallAfterSync :
|
||||||
Key<Boolean>("auto_sync_install", Value.BooleanValue(Android.sdk(31)))
|
Key<Boolean>("auto_sync_install", Value.BooleanValue(Android.sdk(31)))
|
||||||
|
|
||||||
object IncompatibleVersions :
|
object IncompatibleVersions :
|
||||||
|
@ -109,8 +109,8 @@ class SettingsFragment : ScreenFragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
addSwitch(
|
addSwitch(
|
||||||
Preferences.Key.AutoSyncInstall, getString(R.string.sync_auto_install),
|
Preferences.Key.InstallAfterSync, getString(R.string.install_after_sync),
|
||||||
getString(R.string.sync_auto_install_summary)
|
getString(R.string.install_after_sync_summary)
|
||||||
)
|
)
|
||||||
addSwitch(
|
addSwitch(
|
||||||
Preferences.Key.UpdateNotify, getString(R.string.notify_about_updates),
|
Preferences.Key.UpdateNotify, getString(R.string.notify_about_updates),
|
||||||
|
@ -403,7 +403,7 @@ class SyncService : ConnectionService<SyncService.Binder>() {
|
|||||||
currentTask = null
|
currentTask = null
|
||||||
handleNextTask(false)
|
handleNextTask(false)
|
||||||
if (result.isNotEmpty()) {
|
if (result.isNotEmpty()) {
|
||||||
if (Preferences[Preferences.Key.AutoSyncInstall])
|
if (Preferences[Preferences.Key.InstallAfterSync])
|
||||||
runAutoUpdate(result)
|
runAutoUpdate(result)
|
||||||
if (hasUpdates && Preferences[Preferences.Key.UpdateNotify] &&
|
if (hasUpdates && Preferences[Preferences.Key.UpdateNotify] &&
|
||||||
updateNotificationBlockerFragment?.get()?.isAdded == true
|
updateNotificationBlockerFragment?.get()?.isAdded == true
|
||||||
@ -434,7 +434,7 @@ class SyncService : ConnectionService<SyncService.Binder>() {
|
|||||||
* @see SyncService.displayUpdatesNotification
|
* @see SyncService.displayUpdatesNotification
|
||||||
*/
|
*/
|
||||||
private fun runAutoUpdate(productItems: List<ProductItem>) {
|
private fun runAutoUpdate(productItems: List<ProductItem>) {
|
||||||
if (Preferences[Preferences.Key.AutoSyncInstall]) {
|
if (Preferences[Preferences.Key.InstallAfterSync]) {
|
||||||
// run startUpdate on every item
|
// run startUpdate on every item
|
||||||
productItems.map { productItem ->
|
productItems.map { productItem ->
|
||||||
Pair(
|
Pair(
|
||||||
|
@ -180,6 +180,6 @@
|
|||||||
<string name="installed_applications">Installed applications</string>
|
<string name="installed_applications">Installed applications</string>
|
||||||
<string name="sort_filter">Sort & Filter</string>
|
<string name="sort_filter">Sort & Filter</string>
|
||||||
<string name="new_applications">New applications</string>
|
<string name="new_applications">New applications</string>
|
||||||
<string name="sync_auto_install">Install updates automatically</string>
|
<string name="install_after_sync">Install updates automatically</string>
|
||||||
<string name="sync_auto_install_summary">Automatically install app updates after syncing repositories</string>
|
<string name="install_after_sync_summary">Automatically install app updates after syncing repositories</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user