aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-07-05 16:00:26 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-07-05 16:00:26 +0000
commit845e016f0affec9bf5df3ebbb51404d5d1745e74 (patch)
treebb910dfd6b3345328e67da6035311d94310b203c /app
parent9ee22c30984205ad53dbd3eed57b19c0285ae110 (diff)
downloadinfinity-for-reddit-845e016f0affec9bf5df3ebbb51404d5d1745e74.tar
infinity-for-reddit-845e016f0affec9bf5df3ebbb51404d5d1745e74.tar.gz
infinity-for-reddit-845e016f0affec9bf5df3ebbb51404d5d1745e74.tar.bz2
infinity-for-reddit-845e016f0affec9bf5df3ebbb51404d5d1745e74.tar.lz
infinity-for-reddit-845e016f0affec9bf5df3ebbb51404d5d1745e74.tar.xz
infinity-for-reddit-845e016f0affec9bf5df3ebbb51404d5d1745e74.tar.zst
infinity-for-reddit-845e016f0affec9bf5df3ebbb51404d5d1745e74.zip
Fix link color not change in MessageRecyclerViewAdapter and PrivateMessagesDetailRecyclerViewAdapter.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java8
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PrivateMessagesDetailRecyclerViewAdapter.java6
2 files changed, 13 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java
index d35aa692..d088a938 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java
@@ -25,6 +25,7 @@ import butterknife.ButterKnife;
import io.noties.markwon.AbstractMarkwonPlugin;
import io.noties.markwon.Markwon;
import io.noties.markwon.MarkwonConfiguration;
+import io.noties.markwon.core.MarkwonTheme;
import io.noties.markwon.ext.strikethrough.StrikethroughPlugin;
import io.noties.markwon.linkify.LinkifyPlugin;
import io.noties.markwon.simple.ext.SimpleExtPlugin;
@@ -34,9 +35,9 @@ import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity;
import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper;
import ml.docilealligator.infinityforreddit.Message.FetchMessage;
import ml.docilealligator.infinityforreddit.Message.Message;
+import ml.docilealligator.infinityforreddit.Message.ReadMessage;
import ml.docilealligator.infinityforreddit.NetworkState;
import ml.docilealligator.infinityforreddit.R;
-import ml.docilealligator.infinityforreddit.Message.ReadMessage;
import retrofit2.Retrofit;
public class MessageRecyclerViewAdapter extends PagedListAdapter<Message, RecyclerView.ViewHolder> {
@@ -93,6 +94,11 @@ public class MessageRecyclerViewAdapter extends PagedListAdapter<Message, Recycl
mContext.startActivity(intent);
});
}
+
+ @Override
+ public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
+ builder.linkColor(customThemeWrapper.getLinkColor());
+ }
})
.usePlugin(StrikethroughPlugin.create())
.usePlugin(LinkifyPlugin.create(Linkify.WEB_URLS))
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PrivateMessagesDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PrivateMessagesDetailRecyclerViewAdapter.java
index 5bcbba8a..1d8abf5c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PrivateMessagesDetailRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PrivateMessagesDetailRecyclerViewAdapter.java
@@ -26,6 +26,7 @@ import butterknife.ButterKnife;
import io.noties.markwon.AbstractMarkwonPlugin;
import io.noties.markwon.Markwon;
import io.noties.markwon.MarkwonConfiguration;
+import io.noties.markwon.core.MarkwonTheme;
import io.noties.markwon.ext.strikethrough.StrikethroughPlugin;
import io.noties.markwon.linkify.LinkifyPlugin;
import io.noties.markwon.simple.ext.SimpleExtPlugin;
@@ -78,6 +79,11 @@ public class PrivateMessagesDetailRecyclerViewAdapter extends RecyclerView.Adapt
viewPrivateMessagesActivity.startActivity(intent);
});
}
+
+ @Override
+ public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
+ builder.linkColor(customThemeWrapper.getLinkColor());
+ }
})
.usePlugin(StrikethroughPlugin.create())
.usePlugin(LinkifyPlugin.create(Linkify.WEB_URLS))