Always update widgets on launch

Helps mitigate situations where the widgets mysteriously fail to render.
The user can always force a refresh by opening the app.
This commit is contained in:
Alinson S. Xavier 2022-08-17 05:36:37 -05:00
parent bf504641c6
commit 73712e0d10
No known key found for this signature in database
GPG Key ID: 0DA8E4B9E1109DCA

View File

@ -102,8 +102,9 @@ class ListHabitsActivity : AppCompatActivity(), Preferences.Listener {
taskRunner.run {
try {
AutoBackup(this@ListHabitsActivity).run()
appComponent.widgetUpdater.updateWidgets()
} catch (e: Exception) {
Log.e("ListHabitActivity", "AutoBackup task failed", e)
Log.e("ListHabitActivity", "TaskRunner failed", e)
}
}
if (prefs.theme == THEME_DARK && prefs.isPureBlackEnabled != pureBlack) {