From 6d53e94a68b68dd7cc845809b1e054183182727e Mon Sep 17 00:00:00 2001 From: flyingOwl Date: Thu, 25 Jan 2024 17:46:14 +0100 Subject: [PATCH] Make tapping on cover art to open playlist configurable This introduces an option to control whether the current playlist is displayed when the album cover is tapped on the Now Playing screen. This option is enabled by default, so the previous behavior is not changed. Disabling this option makes it easier to access the fading button panel at the bottom of the cover. --- .../daneren2005/dsub/fragments/NowPlayingFragment.java | 8 ++++++-- .../main/java/github/daneren2005/dsub/util/Constants.java | 1 + app/src/main/res/values-de/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/settings_playback.xml | 6 ++++++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java index 504b00860..2ed42d6a9 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java @@ -412,8 +412,12 @@ public void onClick(View view) { albumArtImageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - if (overlayHeight == -1 || lastY < (view.getBottom() - overlayHeight)) { - toggleFullscreenAlbumArt(); + if(Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_TAP_COVER_FOR_PLAYLIST, true)) { + if (overlayHeight == -1 || lastY < (view.getBottom() - overlayHeight)) { + toggleFullscreenAlbumArt(); + setControlsVisible(true); + } + } else { setControlsVisible(true); } } diff --git a/app/src/main/java/github/daneren2005/dsub/util/Constants.java b/app/src/main/java/github/daneren2005/dsub/util/Constants.java index 09ed6b610..fa5ea064a 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java @@ -190,6 +190,7 @@ public final class Constants { public static final String PREFERENCES_KEY_DLNA_CASTING_ENABLED = "dlnaCastingEnabled"; public static final String PREFERENCES_KEY_REWIND_INTERVAL = "rewindInterval"; public static final String PREFERENCES_KEY_FASTFORWARD_INTERVAL = "fastforwardInterval"; + public static final String PREFERENCES_KEY_TAP_COVER_FOR_PLAYLIST = "tapCoverForPlaylist"; public static final String OFFLINE_SCROBBLE_COUNT = "scrobbleCount"; public static final String OFFLINE_SCROBBLE_ID = "scrobbleID"; diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 4f0cc5030..0f5ebb99f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -652,5 +652,7 @@ Erlaube unsichere Verbindungen Erlaube HTTP-Verbindungen und ignoriere Warnungen und Fehler bei HTTPS-Verbindungen (nicht empfohlen!) Die Verbindung zum Server ist unsicher. Unsichere Verbindungen sind in den Einstellungen nicht erlaubt worden. + Albumcover öffnet Wiedergabeliste + Zeige die aktuelle Wiedergabeliste wenn auf das Albumcover getippt wird diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 646c3e837..e99caf529 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -694,5 +694,7 @@ Allow insecure connections Allow http traffic and ignore warnings and errors with https connections (not recommended!) The connection to the server is insecure. Insecure connections have not been enabled in the settings. + Album art opens playlist + Open the current playlist when clicking on the album art diff --git a/app/src/main/res/xml/settings_playback.xml b/app/src/main/res/xml/settings_playback.xml index fd6a7dda5..b4f3c37c9 100644 --- a/app/src/main/res/xml/settings_playback.xml +++ b/app/src/main/res/xml/settings_playback.xml @@ -72,6 +72,12 @@ android:defaultValue="30" android:dialogLayout="@layout/seekbar_preference" myns:max="60"/> + +