Loading app/src/main/java/foundation/e/apps/ui/application/ApplicationFragment.kt +3 −3 Original line number Diff line number Diff line Loading @@ -503,7 +503,7 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { } private fun collectShareVisibilityState() { lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { repeatOnLifecycle(Lifecycle.State.RESUMED) { applicationViewModel.shareButtonVisibilityState.collectLatest { state -> when (state) { Loading @@ -516,7 +516,7 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { } private fun collectAppContentRatingState() { lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { repeatOnLifecycle(Lifecycle.State.RESUMED) { applicationViewModel.appContentRatingState .collectLatest(::updateContentRatingUi) Loading Loading @@ -759,7 +759,7 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { downloadPB.visibility = View.VISIBLE appSize.visibility = View.GONE applicationViewModel.downloadProgress.observe(viewLifecycleOwner) { lifecycleScope.launch(Dispatchers.Main) { viewLifecycleOwner.lifecycleScope.launch(Dispatchers.Main) { updateProgress(it) } } Loading app/src/main/java/foundation/e/apps/ui/applicationlist/ApplicationListFragment.kt +1 −1 Original line number Diff line number Diff line Loading @@ -307,7 +307,7 @@ class ApplicationListFragment : downloadProgress: DownloadProgress ) { val adapter = recyclerView.adapter as ApplicationListRVAdapter lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { adapter.currentList.forEach { fusedApp -> if (fusedApp.status == Status.DOWNLOADING) { val progress = Loading app/src/main/java/foundation/e/apps/ui/home/HomeFragment.kt +1 −1 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ class HomeFragment : TimeoutFragment(R.layout.fragment_home), ApplicationInstall downloadProgress: DownloadProgress, childRV: RecyclerView ) { lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { updateDownloadProgressOfAppList(adapter, downloadProgress, childRV) } } Loading app/src/main/java/foundation/e/apps/ui/search/SearchFragment.kt +1 −1 Original line number Diff line number Diff line Loading @@ -384,7 +384,7 @@ class SearchFragment : private fun updateProgressOfInstallingApps(downloadProgress: DownloadProgress) { val adapter = recyclerView?.adapter as ApplicationListRVAdapter lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { adapter.currentList.forEach { fusedApp -> if (fusedApp.status == Status.DOWNLOADING) { val progress = Loading app/src/main/java/foundation/e/apps/ui/updates/UpdatesFragment.kt +7 −3 Original line number Diff line number Diff line Loading @@ -23,8 +23,10 @@ import android.view.View import androidx.appcompat.app.AlertDialog import androidx.fragment.app.activityViewModels import androidx.fragment.app.viewModels import androidx.lifecycle.Lifecycle import androidx.lifecycle.flowWithLifecycle import androidx.lifecycle.lifecycleScope import androidx.lifecycle.repeatOnLifecycle import androidx.navigation.findNavController import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.LinearLayoutManager Loading Loading @@ -173,11 +175,13 @@ class UpdatesFragment : TimeoutFragment(R.layout.fragment_updates), ApplicationI WorkManager.getInstance(requireContext()) .getWorkInfosForUniqueWorkLiveData(INSTALL_WORK_NAME) .observe(viewLifecycleOwner) { workInfoList -> lifecycleScope.launchWhenResumed { viewLifecycleOwner.lifecycleScope.launch { repeatOnLifecycle(Lifecycle.State.RESUMED) { binding.button.isEnabled = shouldUpdateButtonEnable(workInfoList) } } } } private fun shouldUpdateButtonEnable(workInfoList: MutableList<WorkInfo>) = !updatesViewModel.updatesList.value?.first.isNullOrEmpty() && Loading Loading @@ -353,7 +357,7 @@ class UpdatesFragment : TimeoutFragment(R.layout.fragment_updates), ApplicationI downloadProgress: DownloadProgress ) { val adapter = recyclerView.adapter as ApplicationListRVAdapter lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { adapter.currentList.forEach { fusedApp -> if (fusedApp.status == Status.DOWNLOADING) { val progress = Loading Loading
app/src/main/java/foundation/e/apps/ui/application/ApplicationFragment.kt +3 −3 Original line number Diff line number Diff line Loading @@ -503,7 +503,7 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { } private fun collectShareVisibilityState() { lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { repeatOnLifecycle(Lifecycle.State.RESUMED) { applicationViewModel.shareButtonVisibilityState.collectLatest { state -> when (state) { Loading @@ -516,7 +516,7 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { } private fun collectAppContentRatingState() { lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { repeatOnLifecycle(Lifecycle.State.RESUMED) { applicationViewModel.appContentRatingState .collectLatest(::updateContentRatingUi) Loading Loading @@ -759,7 +759,7 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { downloadPB.visibility = View.VISIBLE appSize.visibility = View.GONE applicationViewModel.downloadProgress.observe(viewLifecycleOwner) { lifecycleScope.launch(Dispatchers.Main) { viewLifecycleOwner.lifecycleScope.launch(Dispatchers.Main) { updateProgress(it) } } Loading
app/src/main/java/foundation/e/apps/ui/applicationlist/ApplicationListFragment.kt +1 −1 Original line number Diff line number Diff line Loading @@ -307,7 +307,7 @@ class ApplicationListFragment : downloadProgress: DownloadProgress ) { val adapter = recyclerView.adapter as ApplicationListRVAdapter lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { adapter.currentList.forEach { fusedApp -> if (fusedApp.status == Status.DOWNLOADING) { val progress = Loading
app/src/main/java/foundation/e/apps/ui/home/HomeFragment.kt +1 −1 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ class HomeFragment : TimeoutFragment(R.layout.fragment_home), ApplicationInstall downloadProgress: DownloadProgress, childRV: RecyclerView ) { lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { updateDownloadProgressOfAppList(adapter, downloadProgress, childRV) } } Loading
app/src/main/java/foundation/e/apps/ui/search/SearchFragment.kt +1 −1 Original line number Diff line number Diff line Loading @@ -384,7 +384,7 @@ class SearchFragment : private fun updateProgressOfInstallingApps(downloadProgress: DownloadProgress) { val adapter = recyclerView?.adapter as ApplicationListRVAdapter lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { adapter.currentList.forEach { fusedApp -> if (fusedApp.status == Status.DOWNLOADING) { val progress = Loading
app/src/main/java/foundation/e/apps/ui/updates/UpdatesFragment.kt +7 −3 Original line number Diff line number Diff line Loading @@ -23,8 +23,10 @@ import android.view.View import androidx.appcompat.app.AlertDialog import androidx.fragment.app.activityViewModels import androidx.fragment.app.viewModels import androidx.lifecycle.Lifecycle import androidx.lifecycle.flowWithLifecycle import androidx.lifecycle.lifecycleScope import androidx.lifecycle.repeatOnLifecycle import androidx.navigation.findNavController import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.LinearLayoutManager Loading Loading @@ -173,11 +175,13 @@ class UpdatesFragment : TimeoutFragment(R.layout.fragment_updates), ApplicationI WorkManager.getInstance(requireContext()) .getWorkInfosForUniqueWorkLiveData(INSTALL_WORK_NAME) .observe(viewLifecycleOwner) { workInfoList -> lifecycleScope.launchWhenResumed { viewLifecycleOwner.lifecycleScope.launch { repeatOnLifecycle(Lifecycle.State.RESUMED) { binding.button.isEnabled = shouldUpdateButtonEnable(workInfoList) } } } } private fun shouldUpdateButtonEnable(workInfoList: MutableList<WorkInfo>) = !updatesViewModel.updatesList.value?.first.isNullOrEmpty() && Loading Loading @@ -353,7 +357,7 @@ class UpdatesFragment : TimeoutFragment(R.layout.fragment_updates), ApplicationI downloadProgress: DownloadProgress ) { val adapter = recyclerView.adapter as ApplicationListRVAdapter lifecycleScope.launch { viewLifecycleOwner.lifecycleScope.launch { adapter.currentList.forEach { fusedApp -> if (fusedApp.status == Status.DOWNLOADING) { val progress = Loading