This commit is contained in:
h4h13 2019-11-02 19:16:17 +05:30
parent eec8738b48
commit 6c27767930
4 changed files with 17 additions and 15 deletions

View file

@ -13,7 +13,7 @@ android {
vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic"
versionCode 388
versionCode 389
versionName '3.4.600'
multiDexEnabled true

View file

@ -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,6 +109,7 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
}
private fun updateButtons() {
if (PreferenceUtil.getInstance(requireContext()).isExtraControls) {
if (MusicPlayerRemote.playingQueue.fistElement()) {
actionPrevious.hide()
} else {
@ -121,6 +122,7 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
actionNext.show()
}
}
}
override fun onUpdateProgressViews(progress: Int, total: Int) {
progressBar.max = total

View file

@ -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);
}

View file

@ -5,7 +5,7 @@
<string name="accent_color">Accent color</string>
<string name="accent_color_desc">The theme accent color, defaults to teal</string>
<string name="action_about">action_add_to_playlist</string>
<string name="action_about">About</string>
<string name="action_add_to_favorites">Add to favorites</string>
<string name="action_add_to_playing_queue">Add to playing queue</string>
<string name="action_add_to_playlist">Add to playlist</string>