forked from mirror/monocles_chat
Clear link descriptions before re-computing
(cherry picked from commit 6224dbcd95d6a0ba6badb5f5cf5dca8fd600c82d)
This commit is contained in:
parent
17d57e34d2
commit
f32727459b
2 changed files with 5 additions and 0 deletions
|
@ -1391,6 +1391,10 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
|
|||
return result;
|
||||
}
|
||||
|
||||
public synchronized void clearLinkDescriptions() {
|
||||
this.payloads.removeAll(getLinkDescriptions());
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
String extension;
|
||||
if (relativeFilePath != null) {
|
||||
|
|
|
@ -1948,6 +1948,7 @@ public class XmppConnectionService extends Service {
|
|||
|
||||
boolean waitForPreview = false;
|
||||
if (getPreferences().getBoolean("send_link_previews", true) && !previewedLinks && !message.needsUploading() && message.getEncryption() != Message.ENCRYPTION_AXOLOTL) {
|
||||
message.clearLinkDescriptions();
|
||||
final List<URI> links = message.getLinks();
|
||||
if (!links.isEmpty()) {
|
||||
waitForPreview = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue