aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewImageOrGifActivity.java3
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ViewRedditGalleryImageOrGifFragment.java3
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Post/PostDataSource.java5
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AdvancedPreferenceFragment.java2
4 files changed, 5 insertions, 8 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewImageOrGifActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewImageOrGifActivity.java
index 9152c1be..fe1a0e9c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewImageOrGifActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewImageOrGifActivity.java
@@ -213,7 +213,6 @@ public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWa
if (view != null) {
view.setMinimumDpi(80);
- view.setQuickScaleEnabled(true);
view.setOnImageEventListener(new SubsamplingScaleImageView.OnImageEventListener() {
@Override
@@ -225,7 +224,7 @@ public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWa
public void onImageLoaded() {
view.setDoubleTapZoomDpi(70);
view.setDoubleTapZoomStyle(SubsamplingScaleImageView.ZOOM_FOCUS_FIXED);
- view.setQuickScaleEnabled(false);
+ view.setQuickScaleEnabled(true);
}
@Override
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ViewRedditGalleryImageOrGifFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ViewRedditGalleryImageOrGifFragment.java
index 015e57c7..97c60653 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ViewRedditGalleryImageOrGifFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ViewRedditGalleryImageOrGifFragment.java
@@ -131,7 +131,6 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
if (view != null) {
view.setMinimumDpi(80);
- view.setQuickScaleEnabled(true);
view.setOnImageEventListener(new SubsamplingScaleImageView.OnImageEventListener() {
@Override
@@ -143,7 +142,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
public void onImageLoaded() {
view.setDoubleTapZoomDpi(70);
view.setDoubleTapZoomStyle(SubsamplingScaleImageView.ZOOM_FOCUS_FIXED);
- view.setQuickScaleEnabled(false);
+ view.setQuickScaleEnabled(true);
}
@Override
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Post/PostDataSource.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Post/PostDataSource.java
index 2b18ef2a..54a80624 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Post/PostDataSource.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Post/PostDataSource.java
@@ -174,11 +174,10 @@ public class PostDataSource extends PageKeyedDataSource<String, Post> {
@Override
public void loadInitial(@NonNull LoadInitialParams<String> params, @NonNull final LoadInitialCallback<String, Post> callback) {
initialLoadStateLiveData.postValue(NetworkState.LOADING);
-
- boolean savePostFeedScrolledPosition = sharedPreferences.getBoolean(SharedPreferencesUtils.SAVE_FRONT_PAGE_SCROLLED_POSITION, true);
- String accountNameForCache = accountName == null ? SharedPreferencesUtils.FRONT_PAGE_SCROLLED_POSITION_ANONYMOUS : accountName;
switch (postType) {
case TYPE_FRONT_PAGE:
+ boolean savePostFeedScrolledPosition = sharedPreferences.getBoolean(SharedPreferencesUtils.SAVE_FRONT_PAGE_SCROLLED_POSITION, true);
+ String accountNameForCache = accountName == null ? SharedPreferencesUtils.FRONT_PAGE_SCROLLED_POSITION_ANONYMOUS : accountName;
if (savePostFeedScrolledPosition) {
loadBestPostsInitial(callback, postFeedScrolledPositionSharedPreferences.getString(accountNameForCache + SharedPreferencesUtils.FRONT_PAGE_SCROLLED_POSITION_FRONT_PAGE_BASE, null));
} else {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AdvancedPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AdvancedPreferenceFragment.java
index 4548a344..4268b28f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AdvancedPreferenceFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AdvancedPreferenceFragment.java
@@ -153,7 +153,7 @@ public class AdvancedPreferenceFragment extends PreferenceFragmentCompat {
.setPositiveButton(R.string.yes, (dialogInterface, i)
-> {
postFeedScrolledPositionSharedPreferences.edit().clear().apply();
- Toast.makeText(activity, R.string.delete_all_post_feed_scrolled_positions_success, Toast.LENGTH_SHORT).show();
+ Toast.makeText(activity, R.string.delete_all_front_page_scrolled_positions_success, Toast.LENGTH_SHORT).show();
})
.setNegativeButton(R.string.no, null)
.show();