From e7cfb5888253dd272d7aa65e4ffad4d532ec9b50 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Tue, 30 May 2023 11:24:25 +0200 Subject: [PATCH] Hide timestamp option in share dialog for channels and playlists --- .../com/github/libretube/ui/dialogs/ShareDialog.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/dialogs/ShareDialog.kt b/app/src/main/java/com/github/libretube/ui/dialogs/ShareDialog.kt index 81703953f..52fc95ee3 100644 --- a/app/src/main/java/com/github/libretube/ui/dialogs/ShareDialog.kt +++ b/app/src/main/java/com/github/libretube/ui/dialogs/ShareDialog.kt @@ -39,9 +39,6 @@ class ShareDialog( } val binding = DialogShareBinding.inflate(layoutInflater) - if (shareObjectType == ShareObjectType.VIDEO) { - setupTimeStampBinding(binding) - } return MaterialAlertDialogBuilder(requireContext()) .setTitle(getString(R.string.share)) @@ -70,7 +67,12 @@ class ShareDialog( val shareIntent = Intent.createChooser(intent, getString(R.string.shareTo)) requireContext().startActivity(shareIntent) } - .setView(binding.root) + .apply { + if (shareObjectType == ShareObjectType.VIDEO) { + setupTimeStampBinding(binding) + setView(binding.root) + } + } .show() }