diff --git a/app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt b/app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt index 7fb6ee71f9df68da50a4b4b1fedbbe5e0237e7b5..53a642dec03164f8c3b2d2b80db9f90a84483213 100644 --- a/app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt +++ b/app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt @@ -54,11 +54,7 @@ class SystemAppsUpdatesRepository @Inject constructor( } val systemName = getFullSystemName() - val endPoint = if ( - systemName.isBlank() || - systemName.contains("beta") || - systemName.contains("rc") - ) { + val endPoint = if (isEligibleToFetchAppListFromTest(systemName)) { UpdatableSystemAppsApi.EndPoint.ENDPOINT_TEST } else { UpdatableSystemAppsApi.EndPoint.ENDPOINT_RELEASE @@ -79,6 +75,11 @@ class SystemAppsUpdatesRepository @Inject constructor( } } + private fun isEligibleToFetchAppListFromTest(systemName: String) = systemName.isBlank() || + systemName.contains("beta") || + systemName.contains("rc") || + systemName.contains("test") + private fun isSystemAppBlocked( systemAppInfo: SystemAppInfo, sdkLevel: Int,