From c4469f2f7a389fb3047b02c112c1d2ffeee90c93 Mon Sep 17 00:00:00 2001 From: Hasib Prince Date: Thu, 10 Oct 2024 23:26:13 +0600 Subject: [PATCH] feat: system app update for test build --- .../e/apps/data/gitlab/SystemAppsUpdatesRepository.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 7fb6ee71f..53a642dec 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, -- GitLab