Renamed keep history to pause history
This commit is contained in:
parent
9b59c5299a
commit
ebe90262cb
6 changed files with 15 additions and 15 deletions
|
@ -164,4 +164,4 @@ const val WALLPAPER_ACCENT = "wallpaper_accent"
|
|||
const val SCREEN_ON_LYRICS = "screen_on_lyrics"
|
||||
const val CIRCLE_PLAY_BUTTON = "circle_play_button"
|
||||
const val SWIPE_ANYWHERE_NOW_PLAYING = "swipe_anywhere_now_playing"
|
||||
const val KEEP_HISTORY = "keep_history"
|
||||
const val PAUSE_HISTORY = "pause_history"
|
|
@ -124,8 +124,8 @@ abstract class AbsMusicServiceActivity : AbsBaseActivity(), IMusicServiceEventLi
|
|||
if (entity != null) {
|
||||
repository.updateHistorySong(MusicPlayerRemote.currentSong)
|
||||
} else {
|
||||
// Check whether keep history option is ON or OFF
|
||||
if (PreferenceUtil.homeHistory) {
|
||||
// Check whether pause history option is ON or OFF
|
||||
if (!PreferenceUtil.pauseHistory) {
|
||||
repository.addSongToHistory(MusicPlayerRemote.currentSong)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
|
|||
adapter = songAdapter
|
||||
layoutManager = linearLayoutManager()
|
||||
}
|
||||
if (PreferenceUtil.homeHistory) { // Observe only if keep history is enabled
|
||||
if (!PreferenceUtil.pauseHistory) { // Observe only if keep history is not paused
|
||||
libraryViewModel.observableHistorySongs().observe(viewLifecycleOwner) {
|
||||
songAdapter.swapDataSet(it)
|
||||
binding.empty.isVisible = it.isEmpty()
|
||||
|
@ -255,7 +255,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
|
|||
|
||||
private fun historyDisabled() {
|
||||
binding.empty.isVisible = true
|
||||
binding.emptyText.text = getString(R.string.history_disabled)
|
||||
binding.emptyText.text = getString(R.string.history_paused)
|
||||
binding.emptyButton.isVisible = true
|
||||
}
|
||||
|
||||
|
|
|
@ -637,10 +637,10 @@ object PreferenceUtil {
|
|||
true
|
||||
)
|
||||
|
||||
val homeHistory: Boolean
|
||||
val pauseHistory: Boolean
|
||||
get() = sharedPreferences.getBoolean(
|
||||
KEEP_HISTORY,
|
||||
true
|
||||
PAUSE_HISTORY,
|
||||
false
|
||||
)
|
||||
|
||||
var audioFadeDuration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue