Add greetings as glance provider

This commit is contained in:
Tommaso Berlose
2020-10-18 12:51:02 +02:00
parent 16076dc145
commit c0e747a714
13 changed files with 266 additions and 14 deletions

View File

@ -18,7 +18,6 @@ object GlanceProviderHelper {
.filter {
context.checkIfFitInstalled() || it != Constants.GlanceProviderId.GOOGLE_FIT_STEPS
}
.filterNot { it.id == Constants.GlanceProviderId.GREETINGS.id }
.toTypedArray()
providers.sortWith(Comparator { p1, p2 ->
@ -102,7 +101,8 @@ object GlanceProviderHelper {
(MediaPlayerHelper.isSomeonePlaying(context)) ||
(Preferences.showBatteryCharging && Preferences.isCharging || Preferences.isBatteryLevelLow) ||
(Preferences.customNotes.isNotEmpty()) ||
(Preferences.showDailySteps && Preferences.googleFitSteps > 0)
(Preferences.showDailySteps && Preferences.googleFitSteps > 0) ||
(Preferences.showGreetings && GreetingsHelper.showGreetings())
)
eventRepository.close()
return showGlance