Add a separate autoclear attribute

This commit is contained in:
Ali
2021-02-12 14:19:08 +04:00
parent afad8495f1
commit a7c7dbfd02
16 changed files with 213 additions and 82 deletions

View File

@@ -209,6 +209,8 @@ func messageMediaEditingOptions(message: Message) -> MessageMediaEditingOptions
for attribute in message.attributes {
if attribute is AutoremoveTimeoutMessageAttribute {
return []
} else if attribute is AutoclearTimeoutMessageAttribute {
return []
}
}
@@ -809,6 +811,9 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
if let _ = attribute as? AutoremoveTimeoutMessageAttribute {
hasAutoremove = true
break
} else if let _ = attribute as? AutoclearTimeoutMessageAttribute {
hasAutoremove = true
break
}
}