Reorganize storage usage settings

This commit is contained in:
Koitharu
2025-02-03 18:15:23 +02:00
parent 008f2d705a
commit 8ca11b214c
11 changed files with 457 additions and 377 deletions

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:title="@string/storage_usage">
<org.koitharu.kotatsu.settings.userdata.storage.StorageUsagePreference android:key="storage_usage" />
<Preference
android:key="search_history_clear"
android:persistent="false"
android:summary="@string/loading_"
android:title="@string/clear_search_history"
app:allowDividerAbove="true" />
<Preference
android:key="updates_feed_clear"
android:persistent="false"
android:summary="@string/loading_"
android:title="@string/clear_updates_feed" />
<Preference
android:key="thumbs_cache_clear"
android:persistent="false"
android:summary="@string/computing_"
android:title="@string/clear_thumbs_cache" />
<Preference
android:key="pages_cache_clear"
android:persistent="false"
android:summary="@string/computing_"
android:title="@string/clear_pages_cache" />
<Preference
android:key="http_cache_clear"
android:persistent="false"
android:summary="@string/loading_"
android:title="@string/clear_network_cache" />
<Preference
android:key="manga_data_clear"
android:persistent="false"
android:summary="@string/clear_database_summary"
android:title="@string/clear_database" />
<Preference
android:key="cookies_clear"
android:persistent="false"
android:summary="@string/clear_cookies_summary"
android:title="@string/clear_cookies" />
<Preference
android:key="chapters_clear"
android:persistent="false"
android:summary="@string/delete_read_chapters_summary"
android:title="@string/delete_read_chapters"
app:allowDividerAbove="true" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="chapters_clear_auto"
android:summary="@string/runs_on_app_start"
android:title="@string/delete_read_chapters_auto" />
</PreferenceScreen>

View File

@@ -54,65 +54,10 @@
</PreferenceCategory>
<PreferenceCategory android:title="@string/storage_usage">
<org.koitharu.kotatsu.settings.userdata.StorageUsagePreference android:key="storage_usage" />
<Preference
android:key="search_history_clear"
android:persistent="false"
android:summary="@string/loading_"
android:title="@string/clear_search_history"
app:allowDividerAbove="true" />
<Preference
android:key="updates_feed_clear"
android:persistent="false"
android:summary="@string/loading_"
android:title="@string/clear_updates_feed" />
<Preference
android:key="thumbs_cache_clear"
android:persistent="false"
android:summary="@string/computing_"
android:title="@string/clear_thumbs_cache" />
<Preference
android:key="pages_cache_clear"
android:persistent="false"
android:summary="@string/computing_"
android:title="@string/clear_pages_cache" />
<Preference
android:key="http_cache_clear"
android:persistent="false"
android:summary="@string/loading_"
android:title="@string/clear_network_cache" />
<Preference
android:key="manga_data_clear"
android:persistent="false"
android:summary="@string/clear_database_summary"
android:title="@string/clear_database" />
<Preference
android:key="cookies_clear"
android:persistent="false"
android:summary="@string/clear_cookies_summary"
android:title="@string/clear_cookies" />
<Preference
android:key="chapters_clear"
android:persistent="false"
android:summary="@string/delete_read_chapters_summary"
android:title="@string/delete_read_chapters" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="chapters_clear_auto"
android:summary="@string/runs_on_app_start"
android:title="@string/delete_read_chapters_auto" />
</PreferenceCategory>
<PreferenceScreen
android:fragment="org.koitharu.kotatsu.settings.userdata.storage.StorageManageSettingsFragment"
android:key="storage_usage"
android:title="@string/storage_usage"
app:allowDividerAbove="true" />
</PreferenceScreen>