Clear cache, configure cache size (#482)
decrease the compression to have better results Move cache size outside of maxsize method. fix progress bar alignment for files Add cache size to picasso Use getAbsolutePath Merge branch 'app-cache' of gitea.com:gitnex/GitNex into app-cache Few imprvoements Merge branch 'master' into app-cache small improvement Implement configure cache size and clear it Co-authored-by: 6543 <6543@noreply.gitea.io> Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/482 Reviewed-by: opyale <opyale@noreply.gitea.io>
This commit is contained in:
@@ -66,4 +66,94 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cacheSizeDataSelectionFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cacheSizeDataHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:text="@string/cacheSizeDataSelectionHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cacheSizeDataSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:text="@string/cacheSizeDataSelectionSelectedText"
|
||||
android:textColor="?attr/selectedTextColor"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cacheSizeImagesSelectionFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cacheSizeImagesHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:text="@string/cacheSizeImagesSelectionHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cacheSizeImagesSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:text="@string/cacheSizeImagesSelectionSelectedText"
|
||||
android:textColor="?attr/selectedTextColor"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/clearCacheSelectionFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/clearCacheHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:text="@string/clearCacheSelectionHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/clearCacheSelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:text="@string/clearCacheSelectionSelectedText"
|
||||
android:textColor="?attr/selectedTextColor"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -54,8 +54,8 @@
|
||||
android:id="@+id/progress_bar"
|
||||
style="@style/Base.Widget.AppCompat.ProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
@@ -288,6 +288,16 @@
|
||||
<string name="settingsFileviewerSourceCodeHeaderText">Source Code Theme</string>
|
||||
<string name="settingsFileviewerSourceCodeSelectedText" translatable="false">Sublime</string>
|
||||
<string name="fileviewerSourceCodeThemeSelectorDialogTitle">Select Source Code Theme</string>
|
||||
<string name="cacheSizeDataDialogHeader">Data Cache Size</string>
|
||||
<string name="cacheSizeDataSelectionHeaderText">Data Cache Size</string>
|
||||
<string name="cacheSizeDataSelectionSelectedText" translatable="false">50 MB</string>
|
||||
<string name="cacheSizeImagesDialogHeader">Images Cache Size</string>
|
||||
<string name="cacheSizeImagesSelectionHeaderText">Images Cache Size</string>
|
||||
<string name="cacheSizeImagesSelectionSelectedText" translatable="false">50 MB</string>
|
||||
<string name="clearCacheSelectionHeaderText">Clear Cache</string>
|
||||
<string name="clearCacheSelectionSelectedText" translatable="false">0 B</string>
|
||||
<string name="clearCacheDialogHeader">Clear Cache?</string>
|
||||
<string name="clearCacheDialogMessage">This will delete all the cache data including files and images.\n\nProceed with deletion?</string>
|
||||
<!-- settings -->
|
||||
|
||||
<string name="noMoreData">No more data available</string>
|
||||
@@ -635,7 +645,7 @@
|
||||
|
||||
<string name="appreanceHintText">Themes, fonts, badges, code block theme</string>
|
||||
<string name="fileViewerHintText">PDF mode, source code theme</string>
|
||||
<string name="securityHintText">SSL certificates</string>
|
||||
<string name="securityHintText">SSL certificates, cache</string>
|
||||
<string name="languagesHintText">Languages</string>
|
||||
<string name="reportsHintText">Crash reports</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user