aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/AccountSavedThingActivity.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/markdown/EmoteCloseBracketInlineProcessor.java29
2 files changed, 17 insertions, 13 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/AccountSavedThingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/AccountSavedThingActivity.java
index 5c99c275..76d8b4c6 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/AccountSavedThingActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/AccountSavedThingActivity.java
@@ -156,7 +156,6 @@ public class AccountSavedThingActivity extends BaseActivity implements ActivityT
private void initializeViewPager() {
sectionsPagerAdapter = new SectionsPagerAdapter(this);
binding.accountSavedThingViewPager2.setAdapter(sectionsPagerAdapter);
- binding.accountSavedThingViewPager2.setOffscreenPageLimit(2);
binding.accountSavedThingViewPager2.setUserInputEnabled(!mSharedPreferences.getBoolean(SharedPreferencesUtils.DISABLE_SWIPING_BETWEEN_TABS, false));
new TabLayoutMediator(binding.accountSavedThingTabLayout, binding.accountSavedThingViewPager2, (tab, position) -> {
switch (position) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/EmoteCloseBracketInlineProcessor.java b/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/EmoteCloseBracketInlineProcessor.java
index c5c24b30..b24dc484 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/EmoteCloseBracketInlineProcessor.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/EmoteCloseBracketInlineProcessor.java
@@ -101,21 +101,26 @@ public class EmoteCloseBracketInlineProcessor extends InlineProcessor {
if (isLinkOrImage) {
// If we got here, open is a potential opener
- if (mediaMetadataMap == null) {
- index = startIndex;
- removeLastBracket();
+ Node linkOrImage;
+ if (opener.image) {
+ if (mediaMetadataMap == null) {
+ index = startIndex;
+ removeLastBracket();
- return text("]");
- }
- MediaMetadata mediaMetadata = mediaMetadataMap.get(dest);
- if (mediaMetadata == null) {
- index = startIndex;
- removeLastBracket();
+ return text("]");
+ }
+ MediaMetadata mediaMetadata = mediaMetadataMap.get(dest);
+ if (mediaMetadata == null) {
+ index = startIndex;
+ removeLastBracket();
- return text("]");
- }
+ return text("]");
+ }
- Node linkOrImage = opener.image ? new Emote(mediaMetadata, title) : new Link(dest, title);
+ linkOrImage = new Emote(mediaMetadata, title);
+ } else {
+ linkOrImage = new Link(dest, title);
+ }
Node node = opener.node.getNext();
while (node != null) {