From 6c2776793075a5e1f8ce21f55354da8164d6eac6 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Sat, 2 Nov 2019 19:16:17 +0530 Subject: [PATCH] Hot fix --- app/build.gradle | 2 +- .../fragments/MiniPlayerFragment.kt | 26 ++++++++++--------- .../retromusic/util/PreferenceUtil.java | 2 +- app/src/main/res/values/strings.xml | 2 +- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7dc0a78a..c4f06ddf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,7 +13,7 @@ android { vectorDrawables.useSupportLibrary = true applicationId "code.name.monkey.retromusic" - versionCode 388 + versionCode 389 versionName '3.4.600' multiDexEnabled true diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt index b3ebd098..75969a32 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt @@ -57,9 +57,9 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda actionPrevious.visibility = View.VISIBLE actionPlayingQueue.visibility = View.VISIBLE } else { - actionNext.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraMiniExtraControls) View.VISIBLE else View.GONE - actionPlayingQueue.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraMiniExtraControls) View.GONE else View.VISIBLE - actionPrevious.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraMiniExtraControls) View.VISIBLE else View.GONE + actionNext.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.VISIBLE else View.GONE + actionPlayingQueue.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.GONE else View.VISIBLE + actionPrevious.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.VISIBLE else View.GONE } actionPlayingQueue.setOnClickListener(this) @@ -109,16 +109,18 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda } private fun updateButtons() { - if (MusicPlayerRemote.playingQueue.fistElement()) { - actionPrevious.hide() - } else { - actionPrevious.show() - } + if (PreferenceUtil.getInstance(requireContext()).isExtraControls) { + if (MusicPlayerRemote.playingQueue.fistElement()) { + actionPrevious.hide() + } else { + actionPrevious.show() + } - if (MusicPlayerRemote.playingQueue.lastElement()) { - actionNext.hide() - } else { - actionNext.show() + if (MusicPlayerRemote.playingQueue.lastElement()) { + actionNext.hide() + } else { + actionNext.show() + } } } diff --git a/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java b/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java index 49ad9f1e..3de74e1f 100644 --- a/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java +++ b/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java @@ -291,7 +291,7 @@ public final class PreferenceUtil { return mPreferences.getBoolean(INITIALIZED_BLACKLIST, false); } - public boolean isExtraMiniExtraControls() { + public boolean isExtraControls() { return mPreferences.getBoolean(TOGGLE_ADD_CONTROLS, false); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4b0c2569..f302c7c2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,7 +5,7 @@ Accent color The theme accent color, defaults to teal - action_add_to_playlist + About Add to favorites Add to playing queue Add to playlist