Loading app/src/main/java/foundation/e/apps/applicationlist/ApplicationListFragment.kt +4 −2 Original line number Diff line number Diff line Loading @@ -161,11 +161,13 @@ class ApplicationListFragment : private fun observeAppListLiveData() { viewModel.appListLiveData.observe(viewLifecycleOwner) { stopLoadingUI() if (it != null) { if (it.isSuccess()) { observeDownloadList(listAdapter, it) } } } } private fun isFusedAppsUpdated(it: ResultSupreme<List<FusedApp>>) = listAdapter.currentList.isEmpty() || it.data != null && viewModel.isAnyAppUpdated( Loading app/src/main/java/foundation/e/apps/applicationlist/ApplicationListViewModel.kt +3 −3 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ class ApplicationListViewModel @Inject constructor( private val fusedAPIRepository: FusedAPIRepository ) : LoadingViewModel() { val appListLiveData: MutableLiveData<ResultSupreme<List<FusedApp>>> = MutableLiveData() val appListLiveData: MutableLiveData<ResultSupreme<List<FusedApp>>?> = MutableLiveData() var isLoading = false Loading Loading @@ -118,7 +118,7 @@ class ApplicationListViewModel @Inject constructor( isLoading = true val result = fusedAPIRepository.loadMore(authData, browseUrl) isLoading = false appListLiveData.postValue(result.first!!) appListLiveData.postValue(result.first) /* * Check if a placeholder app is to be added at the end. * If yes then post the updated result. Loading @@ -127,7 +127,7 @@ class ApplicationListViewModel @Inject constructor( * list, and none at the middle of the list. */ if (fusedAPIRepository.addPlaceHolderAppIfNeeded(result.first)) { appListLiveData.postValue(result.first!!) appListLiveData.postValue(result.first) } /* Loading Loading
app/src/main/java/foundation/e/apps/applicationlist/ApplicationListFragment.kt +4 −2 Original line number Diff line number Diff line Loading @@ -161,11 +161,13 @@ class ApplicationListFragment : private fun observeAppListLiveData() { viewModel.appListLiveData.observe(viewLifecycleOwner) { stopLoadingUI() if (it != null) { if (it.isSuccess()) { observeDownloadList(listAdapter, it) } } } } private fun isFusedAppsUpdated(it: ResultSupreme<List<FusedApp>>) = listAdapter.currentList.isEmpty() || it.data != null && viewModel.isAnyAppUpdated( Loading
app/src/main/java/foundation/e/apps/applicationlist/ApplicationListViewModel.kt +3 −3 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ class ApplicationListViewModel @Inject constructor( private val fusedAPIRepository: FusedAPIRepository ) : LoadingViewModel() { val appListLiveData: MutableLiveData<ResultSupreme<List<FusedApp>>> = MutableLiveData() val appListLiveData: MutableLiveData<ResultSupreme<List<FusedApp>>?> = MutableLiveData() var isLoading = false Loading Loading @@ -118,7 +118,7 @@ class ApplicationListViewModel @Inject constructor( isLoading = true val result = fusedAPIRepository.loadMore(authData, browseUrl) isLoading = false appListLiveData.postValue(result.first!!) appListLiveData.postValue(result.first) /* * Check if a placeholder app is to be added at the end. * If yes then post the updated result. Loading @@ -127,7 +127,7 @@ class ApplicationListViewModel @Inject constructor( * list, and none at the middle of the list. */ if (fusedAPIRepository.addPlaceHolderAppIfNeeded(result.first)) { appListLiveData.postValue(result.first!!) appListLiveData.postValue(result.first) } /* Loading