From fdacc323838b74ccb7664826f7b85203902c117c Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 26 Aug 2022 09:17:43 +0200 Subject: [PATCH] hide add to playlist when not logged in --- .../com/github/libretube/dialogs/VideoOptionsDialog.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt b/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt index 9eb7e221b..0df687c03 100644 --- a/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt +++ b/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt @@ -37,6 +37,13 @@ class VideoOptionsDialog( context?.getString(R.string.share) ) + // remove the add to playlist option if not logged in + if (PreferenceHelper.getToken() == "") { + optionsList.remove( + context?.getString(R.string.addToPlaylist) + + ) + } /** * Check whether the player is running by observing the notification */