Loading app/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -90,8 +90,8 @@ android { buildTypes { debug { versionNameSuffix ".debug" applicationIdSuffix ".debug" // versionNameSuffix ".debug" // applicationIdSuffix ".debug" signingConfig signingConfigs.debugConfig proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } Loading app/src/main/java/foundation/e/apps/data/fused/FusedAPIRepository.kt +0 −5 Original line number Diff line number Diff line Loading @@ -139,11 +139,6 @@ class FusedAPIRepository @Inject constructor(private val fusedAPIImpl: FusedApi) return fusedAPIImpl.getFusedAppInstallationStatus(fusedApp) } fun isHomeDataUpdated( newHomeData: List<FusedHome>, oldHomeData: List<FusedHome> ) = fusedAPIImpl.isHomeDataUpdated(newHomeData, oldHomeData) fun isAnyFusedAppUpdated( newFusedApps: List<FusedApp>, oldFusedApps: List<FusedApp> Loading app/src/main/java/foundation/e/apps/data/fused/FusedApi.kt +0 −8 Original line number Diff line number Diff line Loading @@ -147,14 +147,6 @@ interface FusedApi { */ fun getFusedAppInstallationStatus(fusedApp: FusedApp): Status /** * @return true, if any change is found, otherwise false */ fun isHomeDataUpdated( newHomeData: List<FusedHome>, oldHomeData: List<FusedHome> ): Boolean /** * @return returns true if there is changes in data, otherwise false */ Loading app/src/main/java/foundation/e/apps/data/fused/FusedApiImpl.kt +0 −39 Original line number Diff line number Diff line Loading @@ -1298,45 +1298,6 @@ class FusedApiImpl @Inject constructor( return list } /** * @return true, if any change is found, otherwise false */ override fun isHomeDataUpdated( newHomeData: List<FusedHome>, oldHomeData: List<FusedHome> ): Boolean { if (newHomeData.size != oldHomeData.size) { return true } oldHomeData.forEach { val fusedHome = newHomeData[oldHomeData.indexOf(it)] if (!it.title.contentEquals(fusedHome.title) || areFusedAppsUpdated(it, fusedHome)) { return true } } return false } private fun areFusedAppsUpdated( oldFusedHome: FusedHome, newFusedHome: FusedHome, ): Boolean { val fusedAppDiffUtil = HomeChildFusedAppDiffUtil() if (oldFusedHome.list.size != newFusedHome.list.size) { return true } oldFusedHome.list.forEach { oldFusedApp -> val indexOfOldFusedApp = oldFusedHome.list.indexOf(oldFusedApp) val fusedApp = newFusedHome.list[indexOfOldFusedApp] if (!fusedAppDiffUtil.areContentsTheSame(oldFusedApp, fusedApp)) { return true } } return false } /** * @return returns true if there is changes in data, otherwise false */ Loading app/src/main/java/foundation/e/apps/ui/home/HomeFragment.kt +0 −10 Original line number Diff line number Diff line Loading @@ -94,10 +94,6 @@ class HomeFragment : TimeoutFragment(R.layout.fragment_home), FusedAPIInterface return@observe } if (!isHomeDataUpdated(it)) { return@observe } homeParentRVAdapter?.setData(it.data!!) } } Loading Loading @@ -140,12 +136,6 @@ class HomeFragment : TimeoutFragment(R.layout.fragment_home), FusedAPIInterface ).show(childFragmentManager, "HomeFragment") } private fun isHomeDataUpdated(homeScreenResult: ResultSupreme<List<FusedHome>>) = homeParentRVAdapter?.currentList?.isEmpty() == true || homeViewModel.isHomeDataUpdated( homeScreenResult.data!!, homeParentRVAdapter?.currentList as List<FusedHome> ) override fun onTimeout( exception: Exception, predefinedDialog: AlertDialog.Builder Loading Loading
app/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -90,8 +90,8 @@ android { buildTypes { debug { versionNameSuffix ".debug" applicationIdSuffix ".debug" // versionNameSuffix ".debug" // applicationIdSuffix ".debug" signingConfig signingConfigs.debugConfig proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } Loading
app/src/main/java/foundation/e/apps/data/fused/FusedAPIRepository.kt +0 −5 Original line number Diff line number Diff line Loading @@ -139,11 +139,6 @@ class FusedAPIRepository @Inject constructor(private val fusedAPIImpl: FusedApi) return fusedAPIImpl.getFusedAppInstallationStatus(fusedApp) } fun isHomeDataUpdated( newHomeData: List<FusedHome>, oldHomeData: List<FusedHome> ) = fusedAPIImpl.isHomeDataUpdated(newHomeData, oldHomeData) fun isAnyFusedAppUpdated( newFusedApps: List<FusedApp>, oldFusedApps: List<FusedApp> Loading
app/src/main/java/foundation/e/apps/data/fused/FusedApi.kt +0 −8 Original line number Diff line number Diff line Loading @@ -147,14 +147,6 @@ interface FusedApi { */ fun getFusedAppInstallationStatus(fusedApp: FusedApp): Status /** * @return true, if any change is found, otherwise false */ fun isHomeDataUpdated( newHomeData: List<FusedHome>, oldHomeData: List<FusedHome> ): Boolean /** * @return returns true if there is changes in data, otherwise false */ Loading
app/src/main/java/foundation/e/apps/data/fused/FusedApiImpl.kt +0 −39 Original line number Diff line number Diff line Loading @@ -1298,45 +1298,6 @@ class FusedApiImpl @Inject constructor( return list } /** * @return true, if any change is found, otherwise false */ override fun isHomeDataUpdated( newHomeData: List<FusedHome>, oldHomeData: List<FusedHome> ): Boolean { if (newHomeData.size != oldHomeData.size) { return true } oldHomeData.forEach { val fusedHome = newHomeData[oldHomeData.indexOf(it)] if (!it.title.contentEquals(fusedHome.title) || areFusedAppsUpdated(it, fusedHome)) { return true } } return false } private fun areFusedAppsUpdated( oldFusedHome: FusedHome, newFusedHome: FusedHome, ): Boolean { val fusedAppDiffUtil = HomeChildFusedAppDiffUtil() if (oldFusedHome.list.size != newFusedHome.list.size) { return true } oldFusedHome.list.forEach { oldFusedApp -> val indexOfOldFusedApp = oldFusedHome.list.indexOf(oldFusedApp) val fusedApp = newFusedHome.list[indexOfOldFusedApp] if (!fusedAppDiffUtil.areContentsTheSame(oldFusedApp, fusedApp)) { return true } } return false } /** * @return returns true if there is changes in data, otherwise false */ Loading
app/src/main/java/foundation/e/apps/ui/home/HomeFragment.kt +0 −10 Original line number Diff line number Diff line Loading @@ -94,10 +94,6 @@ class HomeFragment : TimeoutFragment(R.layout.fragment_home), FusedAPIInterface return@observe } if (!isHomeDataUpdated(it)) { return@observe } homeParentRVAdapter?.setData(it.data!!) } } Loading Loading @@ -140,12 +136,6 @@ class HomeFragment : TimeoutFragment(R.layout.fragment_home), FusedAPIInterface ).show(childFragmentManager, "HomeFragment") } private fun isHomeDataUpdated(homeScreenResult: ResultSupreme<List<FusedHome>>) = homeParentRVAdapter?.currentList?.isEmpty() == true || homeViewModel.isHomeDataUpdated( homeScreenResult.data!!, homeParentRVAdapter?.currentList as List<FusedHome> ) override fun onTimeout( exception: Exception, predefinedDialog: AlertDialog.Builder Loading