Loading app/src/main/java/foundation/e/apps/data/application/apps/AppsApi.kt +0 −2 Original line number Diff line number Diff line Loading @@ -67,6 +67,4 @@ interface AppsApi { fun isAnyAppInstallStatusChanged(currentList: List<Application>): Boolean fun isOpenSourceSelected(): Boolean suspend fun getEnglishContentRating(packageName: String): ContentRating? } app/src/main/java/foundation/e/apps/data/application/apps/AppsApiImpl.kt +0 −6 Original line number Diff line number Diff line Loading @@ -266,10 +266,4 @@ class AppsApiImpl @Inject constructor( } override fun isOpenSourceSelected() = appLoungePreference.isOpenSourceSelected() override suspend fun getEnglishContentRating(packageName: String): ContentRating? { return handleNetworkResult { appSources.gplayRepo.getEnglishContentRating(packageName) }.data } } app/src/main/java/foundation/e/apps/data/blockedApps/ContentRatingsRepository.kt +14 −0 Original line number Diff line number Diff line Loading @@ -19,13 +19,18 @@ package foundation.e.apps.data.blockedApps import com.aurora.gplayapi.data.models.ContentRating import com.aurora.gplayapi.helpers.ContentRatingHelper import foundation.e.apps.data.ageRating.AgeGroupApi import foundation.e.apps.data.handleNetworkResult import foundation.e.apps.data.login.AuthenticatorRepository import javax.inject.Inject import javax.inject.Singleton @Singleton class ContentRatingsRepository @Inject constructor( private val ageGroupApi: AgeGroupApi, private val authenticatorRepository: AuthenticatorRepository, ) { private var _contentRatingGroups = listOf<ContentRatingGroup>() Loading @@ -38,4 +43,13 @@ class ContentRatingsRepository @Inject constructor( _contentRatingGroups = response.body() ?: emptyList() } } suspend fun getEnglishContentRating(packageName: String): ContentRating? { val authData = authenticatorRepository.gplayAuth!! val contentRatingHelper = ContentRatingHelper(authData) return handleNetworkResult { contentRatingHelper.getEnglishContentRating(packageName) }.data } } app/src/main/java/foundation/e/apps/data/playstore/PlayStoreRepository.kt +0 −4 Original line number Diff line number Diff line Loading @@ -49,8 +49,4 @@ interface PlayStoreRepository : StoreRepository { appPackage: String, contentRating: ContentRating ): ContentRating suspend fun getEnglishContentRating( appPackage: String, ): ContentRating } app/src/main/java/foundation/e/apps/data/playstore/PlayStoreRepositoryImpl.kt +0 −9 Original line number Diff line number Diff line Loading @@ -228,13 +228,4 @@ class PlayStoreRepositoryImpl @Inject constructor( ) } } override suspend fun getEnglishContentRating(appPackage: String): ContentRating { val authData = authenticatorRepository.gplayAuth!! val contentRatingHelper = ContentRatingHelper(authData) return withContext(Dispatchers.IO) { contentRatingHelper.getEnglishContentRating(appPackage) } } } Loading
app/src/main/java/foundation/e/apps/data/application/apps/AppsApi.kt +0 −2 Original line number Diff line number Diff line Loading @@ -67,6 +67,4 @@ interface AppsApi { fun isAnyAppInstallStatusChanged(currentList: List<Application>): Boolean fun isOpenSourceSelected(): Boolean suspend fun getEnglishContentRating(packageName: String): ContentRating? }
app/src/main/java/foundation/e/apps/data/application/apps/AppsApiImpl.kt +0 −6 Original line number Diff line number Diff line Loading @@ -266,10 +266,4 @@ class AppsApiImpl @Inject constructor( } override fun isOpenSourceSelected() = appLoungePreference.isOpenSourceSelected() override suspend fun getEnglishContentRating(packageName: String): ContentRating? { return handleNetworkResult { appSources.gplayRepo.getEnglishContentRating(packageName) }.data } }
app/src/main/java/foundation/e/apps/data/blockedApps/ContentRatingsRepository.kt +14 −0 Original line number Diff line number Diff line Loading @@ -19,13 +19,18 @@ package foundation.e.apps.data.blockedApps import com.aurora.gplayapi.data.models.ContentRating import com.aurora.gplayapi.helpers.ContentRatingHelper import foundation.e.apps.data.ageRating.AgeGroupApi import foundation.e.apps.data.handleNetworkResult import foundation.e.apps.data.login.AuthenticatorRepository import javax.inject.Inject import javax.inject.Singleton @Singleton class ContentRatingsRepository @Inject constructor( private val ageGroupApi: AgeGroupApi, private val authenticatorRepository: AuthenticatorRepository, ) { private var _contentRatingGroups = listOf<ContentRatingGroup>() Loading @@ -38,4 +43,13 @@ class ContentRatingsRepository @Inject constructor( _contentRatingGroups = response.body() ?: emptyList() } } suspend fun getEnglishContentRating(packageName: String): ContentRating? { val authData = authenticatorRepository.gplayAuth!! val contentRatingHelper = ContentRatingHelper(authData) return handleNetworkResult { contentRatingHelper.getEnglishContentRating(packageName) }.data } }
app/src/main/java/foundation/e/apps/data/playstore/PlayStoreRepository.kt +0 −4 Original line number Diff line number Diff line Loading @@ -49,8 +49,4 @@ interface PlayStoreRepository : StoreRepository { appPackage: String, contentRating: ContentRating ): ContentRating suspend fun getEnglishContentRating( appPackage: String, ): ContentRating }
app/src/main/java/foundation/e/apps/data/playstore/PlayStoreRepositoryImpl.kt +0 −9 Original line number Diff line number Diff line Loading @@ -228,13 +228,4 @@ class PlayStoreRepositoryImpl @Inject constructor( ) } } override suspend fun getEnglishContentRating(appPackage: String): ContentRating { val authData = authenticatorRepository.gplayAuth!! val contentRatingHelper = ContentRatingHelper(authData) return withContext(Dispatchers.IO) { contentRatingHelper.getEnglishContentRating(appPackage) } } }