mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 01:39:22 +02:00
Fix category title in the notification when limits are disabled
This commit is contained in:
parent
8d8a3da564
commit
2824d18db6
1 changed files with 5 additions and 2 deletions
|
@ -618,9 +618,12 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
|||
): AppStatusMessage {
|
||||
val handling = categoryHandlingCache.get(categoryId)
|
||||
|
||||
val titlePrefix = getCategoryTitle(categoryId) + " - "
|
||||
|
||||
return if (handling.areLimitsTemporarilyDisabled) {
|
||||
buildStatusMessageWithCurrentAppTitle(
|
||||
text = appLogic.context.getString(R.string.background_logic_limits_disabled),
|
||||
titlePrefix = titlePrefix,
|
||||
titleSuffix = suffix,
|
||||
appPackageName = appPackageName,
|
||||
appActivityToShow = appActivityToShow
|
||||
|
@ -628,7 +631,7 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
|||
} else if (handling.remainingTime == null) {
|
||||
buildStatusMessageWithCurrentAppTitle(
|
||||
text = appLogic.context.getString(R.string.background_logic_no_timelimit),
|
||||
titlePrefix = getCategoryTitle(categoryId) + " - ",
|
||||
titlePrefix = titlePrefix,
|
||||
titleSuffix = suffix,
|
||||
appPackageName = appPackageName,
|
||||
appActivityToShow = appActivityToShow
|
||||
|
@ -649,7 +652,7 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
|||
TimeTextUtil.pauseIn(remainingSessionDuration.toInt(), appLogic.context)
|
||||
else
|
||||
TimeTextUtil.remaining(realRemainingTimeDefault.toInt() ?: 0, appLogic.context),
|
||||
titlePrefix = getCategoryTitle(categoryId) + " - ",
|
||||
titlePrefix = titlePrefix,
|
||||
titleSuffix = suffix,
|
||||
appPackageName = appPackageName,
|
||||
appActivityToShow = appActivityToShow
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue