From e1b4eab6d5164bd5102805f47eb61b2ff3177b52 Mon Sep 17 00:00:00 2001 From: zaednasr <75589932+zaednasr@users.noreply.github.com> Date: Sun, 12 Nov 2023 17:30:21 +0100 Subject: [PATCH] ... --- .../ui/downloadcard/DownloadBottomSheetDialog.kt | 16 ++++++++++++++++ .../com/deniscerri/ytdlnis/util/UpdateUtil.kt | 7 ------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/deniscerri/ytdlnis/ui/downloadcard/DownloadBottomSheetDialog.kt b/app/src/main/java/com/deniscerri/ytdlnis/ui/downloadcard/DownloadBottomSheetDialog.kt index cde3a5a3..ecbb5cb8 100644 --- a/app/src/main/java/com/deniscerri/ytdlnis/ui/downloadcard/DownloadBottomSheetDialog.kt +++ b/app/src/main/java/com/deniscerri/ytdlnis/ui/downloadcard/DownloadBottomSheetDialog.kt @@ -413,6 +413,13 @@ class DownloadBottomSheetDialog : BottomSheetDialogFragment() { shimmerLoadingSubtitle.visibility = View.VISIBLE shimmerLoading.startShimmer() shimmerLoadingSubtitle.startShimmer() + }else{ + title.visibility = View.VISIBLE + subtitle.visibility = View.VISIBLE + shimmerLoading.visibility = View.GONE + shimmerLoadingSubtitle.visibility = View.GONE + shimmerLoading.stopShimmer() + shimmerLoadingSubtitle.stopShimmer() } } } @@ -428,6 +435,15 @@ class DownloadBottomSheetDialog : BottomSheetDialogFragment() { val f1 = fragmentManager.findFragmentByTag("f1") as DownloadVideoFragment f1.view?.findViewById(R.id.format_loading_progress)?.visibility = View.VISIBLE } + }else{ + runCatching { + val f1 = fragmentManager.findFragmentByTag("f0") as DownloadAudioFragment + f1.view?.findViewById(R.id.format_loading_progress)?.visibility = View.GONE + } + runCatching { + val f1 = fragmentManager.findFragmentByTag("f1") as DownloadVideoFragment + f1.view?.findViewById(R.id.format_loading_progress)?.visibility = View.GONE + } } } } diff --git a/app/src/main/java/com/deniscerri/ytdlnis/util/UpdateUtil.kt b/app/src/main/java/com/deniscerri/ytdlnis/util/UpdateUtil.kt index c695a936..5a1e8639 100644 --- a/app/src/main/java/com/deniscerri/ytdlnis/util/UpdateUtil.kt +++ b/app/src/main/java/com/deniscerri/ytdlnis/util/UpdateUtil.kt @@ -46,13 +46,6 @@ class UpdateUtil(var context: Context) { @SuppressLint("UnspecifiedRegisterReceiverFlag") fun updateApp(result: (result: String) -> Unit) { try { - if (updatingApp) { - Toast.makeText( - context, - context.getString(R.string.ytdl_already_updating), - Toast.LENGTH_LONG - ).show() - } val skippedVersions = sharedPreferences.getString("skip_updates", "")?.split(",")?.distinct()?.toMutableList() ?: mutableListOf() val res = getGithubReleases()