mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 15:30:31 +05:30
Limit the watch history size to 100 by default
This commit is contained in:
parent
93b235abea
commit
22dce72e95
@ -26,7 +26,7 @@ object DatabaseHelper {
|
||||
query {
|
||||
Database.watchHistoryDao().insertAll(watchHistoryItem)
|
||||
val maxHistorySize =
|
||||
PreferenceHelper.getString(PreferenceKeys.WATCH_HISTORY_SIZE, "unlimited")
|
||||
PreferenceHelper.getString(PreferenceKeys.WATCH_HISTORY_SIZE, "100")
|
||||
if (maxHistorySize == "unlimited") return@query
|
||||
|
||||
// delete the first watch history entry if the limit is reached
|
||||
|
@ -28,7 +28,7 @@
|
||||
app:title="@string/watch_history" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="unlimited"
|
||||
android:defaultValue="100"
|
||||
android:entries="@array/historySize"
|
||||
android:entryValues="@array/historySizeValues"
|
||||
android:icon="@drawable/ic_list"
|
||||
|
Loading…
x
Reference in New Issue
Block a user