mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 09:49:25 +02:00
Always show status notification
This commit is contained in:
parent
37108854f1
commit
e38c5d78d4
1 changed files with 8 additions and 12 deletions
|
@ -160,9 +160,6 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
||||||
appLogic.defaultUserLogic.reportScreenOn(appLogic.platformIntegration.isScreenOn())
|
appLogic.defaultUserLogic.reportScreenOn(appLogic.platformIntegration.isScreenOn())
|
||||||
|
|
||||||
appLogic.platformIntegration.setAppStatusMessage(
|
appLogic.platformIntegration.setAppStatusMessage(
|
||||||
if (IsAppInForeground.isRunning())
|
|
||||||
null
|
|
||||||
else
|
|
||||||
AppStatusMessage(
|
AppStatusMessage(
|
||||||
title = appLogic.context.getString(R.string.background_logic_timeout_title),
|
title = appLogic.context.getString(R.string.background_logic_timeout_title),
|
||||||
text = appLogic.context.getString(R.string.background_logic_timeout_text)
|
text = appLogic.context.getString(R.string.background_logic_timeout_text)
|
||||||
|
@ -232,11 +229,10 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
||||||
val foregroundAppPackageName = appLogic.platformIntegration.getForegroundAppPackageName()
|
val foregroundAppPackageName = appLogic.platformIntegration.getForegroundAppPackageName()
|
||||||
// the following is not executed if the permission is missing
|
// the following is not executed if the permission is missing
|
||||||
|
|
||||||
if (foregroundAppPackageName == BuildConfig.APPLICATION_ID) {
|
if (
|
||||||
// this app itself runs now -> no need for an status message
|
(foregroundAppPackageName == BuildConfig.APPLICATION_ID) ||
|
||||||
usedTimeUpdateHelper?.commit(appLogic)
|
(foregroundAppPackageName != null && AndroidIntegrationApps.ignoredApps.contains(foregroundAppPackageName))
|
||||||
appLogic.platformIntegration.setAppStatusMessage(null)
|
) {
|
||||||
} else if (foregroundAppPackageName != null && AndroidIntegrationApps.ignoredApps.contains(foregroundAppPackageName)) {
|
|
||||||
usedTimeUpdateHelper?.commit(appLogic)
|
usedTimeUpdateHelper?.commit(appLogic)
|
||||||
appLogic.platformIntegration.setAppStatusMessage(AppStatusMessage(
|
appLogic.platformIntegration.setAppStatusMessage(AppStatusMessage(
|
||||||
appTitleCache.query(foregroundAppPackageName),
|
appTitleCache.query(foregroundAppPackageName),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue