Limit the watch history size to 100 by default

This commit is contained in:
Bnyro 2023-01-23 17:55:48 +01:00
parent 93b235abea
commit 22dce72e95
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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"