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
|
||||
|
|
|
@ -262,7 +262,7 @@
|
|||
<string name="no_purchase_found">No purchase found.</string>
|
||||
<string name="no_results">No results</string>
|
||||
<string name="no_songs">You have no songs</string>
|
||||
<string name="history_disabled">You have disabled history.</string>
|
||||
<string name="history_paused">You have paused history.</string>
|
||||
<string name="settings_button">Settings</string>
|
||||
<string name="normal">Normal</string>
|
||||
<string name="normal_lyrics">Normal lyrics</string>
|
||||
|
@ -358,7 +358,7 @@
|
|||
<string name="pref_summary_toggle_volume">If enough space is available, show volume controls in the now playing screen</string>
|
||||
<string name="pref_summary_wallpaper_accent">Extract accent color from wallpaper</string>
|
||||
<string name="pref_summary_whitelist">Only show music from /Music Folder</string>
|
||||
<string name="pref_summary_keep_history">Keeps a history of played songs</string>
|
||||
<string name="pref_summary_pause_history">When enabled, newly played songs won\'t show in history</string>
|
||||
<string name="pref_title_album_art_on_lockscreen">Show album cover</string>
|
||||
<string name="pref_title_album_artists_only">Navigate by Album Artist</string>
|
||||
<string name="pref_title_album_cover_style">Album cover theme</string>
|
||||
|
@ -405,7 +405,7 @@
|
|||
<string name="pref_title_toggle_volume">Volume controls</string>
|
||||
<string name="pref_title_wallpaper_accent">Wallpaper accent color</string>
|
||||
<string name="pref_title_whitelist">Whitelist music</string>
|
||||
<string name="pref_title_keep_history">Keep history</string>
|
||||
<string name="pref_title_pause_history">Pause history</string>
|
||||
<string name="pro">Pro</string>
|
||||
<string name="pro_summary">Black theme, Now playing themes, Carousel effect and more..</string>
|
||||
<string name="profile">Profile</string>
|
||||
|
|
|
@ -41,11 +41,11 @@
|
|||
android:title="@string/pref_title_suggestions" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="keep_history"
|
||||
android:defaultValue="false"
|
||||
android:key="pause_history"
|
||||
android:layout="@layout/list_item_view_switch"
|
||||
android:summary="@string/pref_summary_keep_history"
|
||||
android:title="@string/pref_title_keep_history" />
|
||||
android:summary="@string/pref_summary_pause_history"
|
||||
android:title="@string/pref_title_pause_history" />
|
||||
|
||||
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue