Hide timestamp option in share dialog for channels and playlists

This commit is contained in:
Bnyro 2023-05-30 11:24:25 +02:00
parent 70fdd10a21
commit e7cfb58882

View File

@ -39,9 +39,6 @@ class ShareDialog(
} }
val binding = DialogShareBinding.inflate(layoutInflater) val binding = DialogShareBinding.inflate(layoutInflater)
if (shareObjectType == ShareObjectType.VIDEO) {
setupTimeStampBinding(binding)
}
return MaterialAlertDialogBuilder(requireContext()) return MaterialAlertDialogBuilder(requireContext())
.setTitle(getString(R.string.share)) .setTitle(getString(R.string.share))
@ -70,7 +67,12 @@ class ShareDialog(
val shareIntent = Intent.createChooser(intent, getString(R.string.shareTo)) val shareIntent = Intent.createChooser(intent, getString(R.string.shareTo))
requireContext().startActivity(shareIntent) requireContext().startActivity(shareIntent)
} }
.setView(binding.root) .apply {
if (shareObjectType == ShareObjectType.VIDEO) {
setupTimeStampBinding(binding)
setView(binding.root)
}
}
.show() .show()
} }