aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java12
2 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
index 3215c9ef0..8a2ca0b4d 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -685,7 +685,8 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
viewHolder.messageBody.setTextIsSelectable(true);
viewHolder.messageBody.setMovementMethod(ClickableMovementMethod.getInstance());
listSelectionManager.onUpdate(viewHolder.messageBody, message);
- if (showLinksInside) {
+ boolean dataSaverDisabled = activity.xmppConnectionService.isDataSaverDisabled();
+ if (showLinksInside && dataSaverDisabled) {
viewHolder.richlinkview.setVisibility(View.VISIBLE);
viewHolder.richlinkview.setLink(body.toString(), new ViewListener() {
diff --git a/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java b/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java
index 7a7baa5c7..b82095c32 100644
--- a/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java
+++ b/src/main/java/de/pixart/messenger/ui/widget/RichLinkView.java
@@ -97,14 +97,10 @@ public class RichLinkView extends RelativeLayout {
if (meta.getImageurl().equals("") || meta.getImageurl().isEmpty()) {
imageView.setVisibility(GONE);
} else {
- if (mXmppConnectionService != null && mXmppConnectionService.isDataSaverDisabled()) {
- imageView.setVisibility(VISIBLE);
- Picasso.get()
- .load(meta.getImageurl())
- .into(imageView);
- } else {
- imageView.setVisibility(GONE);
- }
+ imageView.setVisibility(VISIBLE);
+ Picasso.get()
+ .load(meta.getImageurl())
+ .into(imageView);
}
if (meta.getTitle().isEmpty() || meta.getTitle().equals("")) {
textViewTitle.setVisibility(GONE);