Refactor notifications (#4883)
Also fixes https://github.com/tuskyapp/Tusky/issues/4858. But apart from that there should be no functional change.
This commit is contained in:
parent
6c85f72a35
commit
3a3e056572
19 changed files with 1072 additions and 1217 deletions
|
|
@ -24,7 +24,6 @@ import androidx.work.Constraints
|
|||
import androidx.work.ExistingPeriodicWorkPolicy
|
||||
import androidx.work.PeriodicWorkRequestBuilder
|
||||
import androidx.work.WorkManager
|
||||
import com.keylesspalace.tusky.components.systemnotifications.NotificationHelper
|
||||
import com.keylesspalace.tusky.settings.AppTheme
|
||||
import com.keylesspalace.tusky.settings.NEW_INSTALL_SCHEMA_VERSION
|
||||
import com.keylesspalace.tusky.settings.PrefKeys
|
||||
|
|
@ -75,6 +74,7 @@ class TuskyApplication : Application(), Configuration.Provider {
|
|||
NEW_INSTALL_SCHEMA_VERSION
|
||||
)
|
||||
if (oldVersion != SCHEMA_VERSION) {
|
||||
// TODO SCHEMA_VERSION is outdated / not updated in code
|
||||
upgradeSharedPreferences(oldVersion, SCHEMA_VERSION)
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +89,6 @@ class TuskyApplication : Application(), Configuration.Provider {
|
|||
|
||||
localeManager.setLocale()
|
||||
|
||||
NotificationHelper.createWorkerNotificationChannel(this)
|
||||
|
||||
// Prune the database every ~ 12 hours when the device is idle.
|
||||
val pruneCacheWorker = PeriodicWorkRequestBuilder<PruneCacheWorker>(12, TimeUnit.HOURS)
|
||||
.setConstraints(Constraints.Builder().setRequiresDeviceIdle(true).build())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue