mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 17:59:51 +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 {
|
): AppStatusMessage {
|
||||||
val handling = categoryHandlingCache.get(categoryId)
|
val handling = categoryHandlingCache.get(categoryId)
|
||||||
|
|
||||||
|
val titlePrefix = getCategoryTitle(categoryId) + " - "
|
||||||
|
|
||||||
return if (handling.areLimitsTemporarilyDisabled) {
|
return if (handling.areLimitsTemporarilyDisabled) {
|
||||||
buildStatusMessageWithCurrentAppTitle(
|
buildStatusMessageWithCurrentAppTitle(
|
||||||
text = appLogic.context.getString(R.string.background_logic_limits_disabled),
|
text = appLogic.context.getString(R.string.background_logic_limits_disabled),
|
||||||
|
titlePrefix = titlePrefix,
|
||||||
titleSuffix = suffix,
|
titleSuffix = suffix,
|
||||||
appPackageName = appPackageName,
|
appPackageName = appPackageName,
|
||||||
appActivityToShow = appActivityToShow
|
appActivityToShow = appActivityToShow
|
||||||
|
@ -628,7 +631,7 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
||||||
} else if (handling.remainingTime == null) {
|
} else if (handling.remainingTime == null) {
|
||||||
buildStatusMessageWithCurrentAppTitle(
|
buildStatusMessageWithCurrentAppTitle(
|
||||||
text = appLogic.context.getString(R.string.background_logic_no_timelimit),
|
text = appLogic.context.getString(R.string.background_logic_no_timelimit),
|
||||||
titlePrefix = getCategoryTitle(categoryId) + " - ",
|
titlePrefix = titlePrefix,
|
||||||
titleSuffix = suffix,
|
titleSuffix = suffix,
|
||||||
appPackageName = appPackageName,
|
appPackageName = appPackageName,
|
||||||
appActivityToShow = appActivityToShow
|
appActivityToShow = appActivityToShow
|
||||||
|
@ -649,7 +652,7 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
||||||
TimeTextUtil.pauseIn(remainingSessionDuration.toInt(), appLogic.context)
|
TimeTextUtil.pauseIn(remainingSessionDuration.toInt(), appLogic.context)
|
||||||
else
|
else
|
||||||
TimeTextUtil.remaining(realRemainingTimeDefault.toInt() ?: 0, appLogic.context),
|
TimeTextUtil.remaining(realRemainingTimeDefault.toInt() ?: 0, appLogic.context),
|
||||||
titlePrefix = getCategoryTitle(categoryId) + " - ",
|
titlePrefix = titlePrefix,
|
||||||
titleSuffix = suffix,
|
titleSuffix = suffix,
|
||||||
appPackageName = appPackageName,
|
appPackageName = appPackageName,
|
||||||
appActivityToShow = appActivityToShow
|
appActivityToShow = appActivityToShow
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue