mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 17:59:51 +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")
|
||||
}
|
||||
|
||||
if (forNotification && category.blockAllNotifications) {
|
||||
return liveDataFromValue(BlockingReason.NotificationsAreBlocked)
|
||||
fun default() = getBlockingReasonStep4Point7(category, child, timeZone, isParentCategory, forNotification)
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue