Remove preview limit
At least it works well on my MT6765
This commit is contained in:
1 parent
3f8984d2dc
commit
bbe0e8c5a9
3 files changed
+2
-21
No files matched your search
@@ -90,8 +90,6 @@ public class Settings {
|
||||
private static final boolean DEFAULT_HIDE_HV_EVENTS = true;
|
||||
private static final String KEY_SHOW_COMMENTS = "show_gallery_comments";
|
||||
private static final boolean DEFAULT_SHOW_COMMENTS = true;
|
||||
private static final String KEY_PREVIEW_NUM = "preview_num";
|
||||
private static final int DEFAULT_PREVIEW_NUM = 60;
|
||||
private static final String TAG = Settings.class.getSimpleName();
|
||||
private static final String KEY_DISPLAY_NAME = "display_name";
|
||||
private static final String DEFAULT_DISPLAY_NAME = null;
|
||||
@@ -423,10 +421,6 @@ public class Settings {
|
||||
putBoolean(KEY_SHOW_TAG_TRANSLATIONS, value);
|
||||
}
|
||||
|
||||
public static int getPreviewNum() {
|
||||
return getInt(KEY_PREVIEW_NUM, DEFAULT_PREVIEW_NUM);
|
||||
}
|
||||
|
||||
public static int getDefaultCategories() {
|
||||
return getInt(KEY_DEFAULT_CATEGORIES, DEFAULT_DEFAULT_CATEGORIES);
|
||||
}
|
||||
|
||||
@@ -690,7 +690,6 @@ class GalleryDetailScene : CollapsingToolbarScene(), View.OnClickListener, Downl
|
||||
private fun bindPreviews(gd: GalleryDetail) {
|
||||
val inflater = layoutInflater
|
||||
resourcesOrNull ?: return
|
||||
val previewNum = Settings.getPreviewNum()
|
||||
_binding ?: return
|
||||
binding.content.previews.run {
|
||||
gridLayout.removeAllViews()
|
||||
@@ -698,7 +697,7 @@ class GalleryDetailScene : CollapsingToolbarScene(), View.OnClickListener, Downl
|
||||
if (gd.previewPages <= 0 || previewSet == null || previewSet.size() == 0) {
|
||||
previewText.setText(R.string.no_previews)
|
||||
return
|
||||
} else if (gd.previewPages == 1 && previewSet.size() <= previewNum) {
|
||||
} else if (gd.previewPages == 1) {
|
||||
previewText.setText(R.string.no_more_previews)
|
||||
} else {
|
||||
previewText.setText(R.string.more_previews)
|
||||
@@ -706,8 +705,7 @@ class GalleryDetailScene : CollapsingToolbarScene(), View.OnClickListener, Downl
|
||||
val columnWidth = Settings.getThumbSize()
|
||||
gridLayout.setColumnSize(columnWidth)
|
||||
gridLayout.setStrategy(SimpleGridAutoSpanLayout.STRATEGY_SUITABLE_SIZE)
|
||||
val size = previewNum.coerceAtMost(previewSet.size())
|
||||
for (i in 0 until size) {
|
||||
for (i in 0 until previewSet.size()) {
|
||||
val view = inflater.inflate(R.layout.item_gallery_preview, gridLayout, false)
|
||||
gridLayout.addView(view)
|
||||
val image = view.findViewById<LoadImageView>(R.id.image)
|
||||
|
||||
@@ -146,17 +146,6 @@
|
||||
app:iconSpaceReserved="false"
|
||||
app:url="@string/settings_eh_tag_translations_source_url" />
|
||||
|
||||
<SeekBarPreference
|
||||
android:defaultValue="60"
|
||||
android:key="preview_num"
|
||||
android:max="200"
|
||||
android:summary="@string/settings_eh_preview_num_summary"
|
||||
android:title="@string/settings_eh_preview_num"
|
||||
app:iconSpaceReserved="false"
|
||||
app:min="10"
|
||||
app:showSeekBarValue="true"
|
||||
app:singleLineTitle="false" />
|
||||
|
||||
<Preference
|
||||
android:key="filter"
|
||||
android:summary="@string/settings_eh_filter_summary"
|
||||
|
||||
Reference in new issue
Block a user