mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 20:49:36 +01:00
dont show deletion option for attachments
(deletion for attachments in talk is not supported by server) Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
04e418ddfd
commit
1673d15e5e
@ -1800,6 +1800,8 @@ class ChatController(args: Bundle) :
|
||||
|
||||
if (message.isDeleted) return false
|
||||
|
||||
if (message.hasFileAttachment()) return false
|
||||
|
||||
val sixHoursInMillis = 6 * 3600 * 1000
|
||||
val isOlderThanSixHours = message.createdAt?.before(Date(System.currentTimeMillis() - sixHoursInMillis)) == true
|
||||
if (isOlderThanSixHours) return false
|
||||
|
@ -91,7 +91,7 @@ public class ChatMessage implements IMessage, MessageContentType, MessageContent
|
||||
MessageType.SYSTEM_MESSAGE, MessageType.SINGLE_LINK_VIDEO_MESSAGE,
|
||||
MessageType.SINGLE_LINK_AUDIO_MESSAGE, MessageType.SINGLE_LINK_MESSAGE);
|
||||
|
||||
private boolean hasFileAttachment() {
|
||||
public boolean hasFileAttachment() {
|
||||
if (messageParameters != null && messageParameters.size() > 0) {
|
||||
for (String key : messageParameters.keySet()) {
|
||||
Map<String, String> individualHashMap = messageParameters.get(key);
|
||||
@ -100,7 +100,6 @@ public class ChatMessage implements IMessage, MessageContentType, MessageContent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user