Renamed keep history to pause history

This commit is contained in:
Omar 2022-03-08 18:05:06 +02:00
parent 9b59c5299a
commit ebe90262cb
6 changed files with 15 additions and 15 deletions

View file

@ -164,4 +164,4 @@ const val WALLPAPER_ACCENT = "wallpaper_accent"
const val SCREEN_ON_LYRICS = "screen_on_lyrics" const val SCREEN_ON_LYRICS = "screen_on_lyrics"
const val CIRCLE_PLAY_BUTTON = "circle_play_button" const val CIRCLE_PLAY_BUTTON = "circle_play_button"
const val SWIPE_ANYWHERE_NOW_PLAYING = "swipe_anywhere_now_playing" const val SWIPE_ANYWHERE_NOW_PLAYING = "swipe_anywhere_now_playing"
const val KEEP_HISTORY = "keep_history" const val PAUSE_HISTORY = "pause_history"

View file

@ -124,8 +124,8 @@ abstract class AbsMusicServiceActivity : AbsBaseActivity(), IMusicServiceEventLi
if (entity != null) { if (entity != null) {
repository.updateHistorySong(MusicPlayerRemote.currentSong) repository.updateHistorySong(MusicPlayerRemote.currentSong)
} else { } else {
// Check whether keep history option is ON or OFF // Check whether pause history option is ON or OFF
if (PreferenceUtil.homeHistory) { if (!PreferenceUtil.pauseHistory) {
repository.addSongToHistory(MusicPlayerRemote.currentSong) repository.addSongToHistory(MusicPlayerRemote.currentSong)
} }
} }

View file

@ -164,7 +164,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
adapter = songAdapter adapter = songAdapter
layoutManager = linearLayoutManager() 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) { libraryViewModel.observableHistorySongs().observe(viewLifecycleOwner) {
songAdapter.swapDataSet(it) songAdapter.swapDataSet(it)
binding.empty.isVisible = it.isEmpty() binding.empty.isVisible = it.isEmpty()
@ -255,7 +255,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
private fun historyDisabled() { private fun historyDisabled() {
binding.empty.isVisible = true binding.empty.isVisible = true
binding.emptyText.text = getString(R.string.history_disabled) binding.emptyText.text = getString(R.string.history_paused)
binding.emptyButton.isVisible = true binding.emptyButton.isVisible = true
} }

View file

@ -637,10 +637,10 @@ object PreferenceUtil {
true true
) )
val homeHistory: Boolean val pauseHistory: Boolean
get() = sharedPreferences.getBoolean( get() = sharedPreferences.getBoolean(
KEEP_HISTORY, PAUSE_HISTORY,
true false
) )
var audioFadeDuration var audioFadeDuration

View file

@ -262,7 +262,7 @@
<string name="no_purchase_found">No purchase found.</string> <string name="no_purchase_found">No purchase found.</string>
<string name="no_results">No results</string> <string name="no_results">No results</string>
<string name="no_songs">You have no songs</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="settings_button">Settings</string>
<string name="normal">Normal</string> <string name="normal">Normal</string>
<string name="normal_lyrics">Normal lyrics</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_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_wallpaper_accent">Extract accent color from wallpaper</string>
<string name="pref_summary_whitelist">Only show music from /Music Folder</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_art_on_lockscreen">Show album cover</string>
<string name="pref_title_album_artists_only">Navigate by Album Artist</string> <string name="pref_title_album_artists_only">Navigate by Album Artist</string>
<string name="pref_title_album_cover_style">Album cover theme</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_toggle_volume">Volume controls</string>
<string name="pref_title_wallpaper_accent">Wallpaper accent color</string> <string name="pref_title_wallpaper_accent">Wallpaper accent color</string>
<string name="pref_title_whitelist">Whitelist music</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">Pro</string>
<string name="pro_summary">Black theme, Now playing themes, Carousel effect and more..</string> <string name="pro_summary">Black theme, Now playing themes, Carousel effect and more..</string>
<string name="profile">Profile</string> <string name="profile">Profile</string>

View file

@ -41,11 +41,11 @@
android:title="@string/pref_title_suggestions" /> android:title="@string/pref_title_suggestions" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference <code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true" android:defaultValue="false"
android:key="keep_history" android:key="pause_history"
android:layout="@layout/list_item_view_switch" android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_keep_history" android:summary="@string/pref_summary_pause_history"
android:title="@string/pref_title_keep_history" /> android:title="@string/pref_title_pause_history" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory> </code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>