mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-04 10:19:18 +02:00
Disable notification filter in free version
This commit is contained in:
parent
51f824441f
commit
a214eb3182
1 changed files with 16 additions and 2 deletions
|
@ -152,8 +152,22 @@ class BlockingReasonUtil(private val appLogic: AppLogic) {
|
||||||
Log.d(LOG_TAG, "step 4.5")
|
Log.d(LOG_TAG, "step 4.5")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (forNotification && category.blockAllNotifications) {
|
fun default() = getBlockingReasonStep4Point7(category, child, timeZone, isParentCategory, forNotification)
|
||||||
return liveDataFromValue(BlockingReason.NotificationsAreBlocked)
|
|
||||||
|
return if (forNotification && category.blockAllNotifications) {
|
||||||
|
appLogic.fullVersion.shouldProvideFullVersionFunctions.switchMap { fullVersion ->
|
||||||
|
if (fullVersion) {
|
||||||
|
liveDataFromValue(BlockingReason.NotificationsAreBlocked)
|
||||||
|
} else {
|
||||||
|
default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else default()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getBlockingReasonStep4Point7(category: Category, child: User, timeZone: TimeZone, isParentCategory: Boolean, forNotification: Boolean): LiveData<BlockingReason> {
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
|
Log.d(LOG_TAG, "step 4.7")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (category.temporarilyBlocked) {
|
if (category.temporarilyBlocked) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue