Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tapping on cover art to open playlist configurable #17

Merged
merged 1 commit into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -652,5 +652,7 @@
<string name="settings.server_allowinsecure">Erlaube unsichere Verbindungen</string>
<string name="settings.server_allowinsecure_summary">Erlaube HTTP-Verbindungen und ignoriere Warnungen und Fehler bei HTTPS-Verbindungen (nicht empfohlen!)</string>
<string name="background_task.network_insecure_error">Die Verbindung zum Server ist unsicher. Unsichere Verbindungen sind in den Einstellungen nicht erlaubt worden.</string>
<string name="settings.tap_cover_for_playlist">Albumcover öffnet Wiedergabeliste</string>
<string name="settings.tap_cover_for_playlist_summary">Zeige die aktuelle Wiedergabeliste wenn auf das Albumcover getippt wird</string>

</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -694,5 +694,7 @@
<string name="settings.server_allowinsecure">Allow insecure connections</string>
<string name="settings.server_allowinsecure_summary">Allow http traffic and ignore warnings and errors with https connections (not recommended!)</string>
<string name="background_task.network_insecure_error">The connection to the server is insecure. Insecure connections have not been enabled in the settings.</string>
<string name="settings.tap_cover_for_playlist">Album art opens playlist</string>
<string name="settings.tap_cover_for_playlist_summary">Open the current playlist when clicking on the album art</string>

</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/xml/settings_playback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
android:defaultValue="30"
android:dialogLayout="@layout/seekbar_preference"
myns:max="60"/>

<CheckBoxPreference
android:title="@string/settings.tap_cover_for_playlist"
android:summary="@string/settings.tap_cover_for_playlist_summary"
android:key="tapCoverForPlaylist"
android:defaultValue="true"/>
</PreferenceCategory>

<PreferenceCategory
Expand Down