Loading app/src/main/java/foundation/e/apps/MainActivity.kt +13 −10 Original line number Diff line number Diff line Loading @@ -207,18 +207,21 @@ class MainActivity : AppCompatActivity() { } launch { observeAgeLimitRestrictionEvent() } } } } private suspend fun observeAgeLimitRestrictionEvent() { EventBus.events.filter { it is AppEvent.AgeRateLimit it is AppEvent.AgeLimitRestrictionEvent }.collectLatest { ApplicationDialogFragment( getString(R.string.unknown_error), getString(R.string.age_rate_limit_message), positiveButtonText = getString(R.string.ok), ).show(supportFragmentManager, TAG) } } } } } Loading app/src/main/java/foundation/e/apps/install/workmanager/AppInstallProcessor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ class AppInstallProcessor @Inject constructor( if (checkAppAgeLimitUseCase.invoke(appInstall)) { Timber.i("Content rating is not allowed for: ${appInstall.name}") EventBus.invokeEvent(AppEvent.AgeRateLimit(appInstall.name)) EventBus.invokeEvent(AppEvent.AgeLimitRestrictionEvent(appInstall.name)) appManagerWrapper.cancelDownload(appInstall) return } Loading app/src/main/java/foundation/e/apps/utils/eventBus/AppEvent.kt +1 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,5 @@ sealed class AppEvent(val data: Any) { class AppPurchaseEvent(appInstall: AppInstall) : AppEvent(appInstall) class NoInternetEvent(isInternetAvailable: Boolean) : AppEvent(isInternetAvailable) class TooManyRequests : AppEvent(Unit) class AgeRateLimit(title: String) : AppEvent(String) class AgeLimitRestrictionEvent(title: String) : AppEvent(String) } Loading
app/src/main/java/foundation/e/apps/MainActivity.kt +13 −10 Original line number Diff line number Diff line Loading @@ -207,18 +207,21 @@ class MainActivity : AppCompatActivity() { } launch { observeAgeLimitRestrictionEvent() } } } } private suspend fun observeAgeLimitRestrictionEvent() { EventBus.events.filter { it is AppEvent.AgeRateLimit it is AppEvent.AgeLimitRestrictionEvent }.collectLatest { ApplicationDialogFragment( getString(R.string.unknown_error), getString(R.string.age_rate_limit_message), positiveButtonText = getString(R.string.ok), ).show(supportFragmentManager, TAG) } } } } } Loading
app/src/main/java/foundation/e/apps/install/workmanager/AppInstallProcessor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ class AppInstallProcessor @Inject constructor( if (checkAppAgeLimitUseCase.invoke(appInstall)) { Timber.i("Content rating is not allowed for: ${appInstall.name}") EventBus.invokeEvent(AppEvent.AgeRateLimit(appInstall.name)) EventBus.invokeEvent(AppEvent.AgeLimitRestrictionEvent(appInstall.name)) appManagerWrapper.cancelDownload(appInstall) return } Loading
app/src/main/java/foundation/e/apps/utils/eventBus/AppEvent.kt +1 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,5 @@ sealed class AppEvent(val data: Any) { class AppPurchaseEvent(appInstall: AppInstall) : AppEvent(appInstall) class NoInternetEvent(isInternetAvailable: Boolean) : AppEvent(isInternetAvailable) class TooManyRequests : AppEvent(Unit) class AgeRateLimit(title: String) : AppEvent(String) class AgeLimitRestrictionEvent(title: String) : AppEvent(String) }