mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-23 21:45:42 +03:00
parent
f37a05dfb6
commit
2a90560056
1 changed files with 11 additions and 0 deletions
|
@ -123,6 +123,7 @@ public class MagicPreviewMessageViewHolder extends MessageHolders.IncomingImageM
|
||||||
} else {
|
} else {
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(message.getSelectedIndividualHashMap().get("link")));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(message.getSelectedIndividualHashMap().get("link")));
|
||||||
browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
browserIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
|
||||||
context.startActivity(browserIntent);
|
context.startActivity(browserIntent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -133,6 +134,16 @@ public class MagicPreviewMessageViewHolder extends MessageHolders.IncomingImageM
|
||||||
messageText.setText("Tenor");
|
messageText.setText("Tenor");
|
||||||
DisplayUtils.setClickableString("Tenor", "https://tenor.com", messageText);
|
DisplayUtils.setClickableString("Tenor", "https://tenor.com", messageText);
|
||||||
} else {
|
} else {
|
||||||
|
if (message.getMessageType().equals(ChatMessage.MessageType.SINGLE_LINK_IMAGE_MESSAGE)) {
|
||||||
|
image.setOnClickListener(v -> {
|
||||||
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(message.getImageUrl()));
|
||||||
|
browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
browserIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
|
||||||
|
context.startActivity(browserIntent);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
image.setOnClickListener(null);
|
||||||
|
}
|
||||||
messageText.setText("");
|
messageText.setText("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue