hide system message "You voted on the poll ..."

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-07-20 18:10:12 +02:00 committed by Andy Scherzinger (Rebase PR Action)
parent 58739b8f14
commit c7014fd063

View File

@ -2593,6 +2593,11 @@ class ChatController(args: Bundle) :
chatMessageIterator.remove()
}
// delete poll system messages
else if (isPollVotedMessage(currentMessage)) {
chatMessageIterator.remove()
}
}
return chatMessageMap.values.toList()
}
@ -2608,6 +2613,10 @@ class ChatController(args: Bundle) :
currentMessage.value.systemMessageType == ChatMessage.SystemMessageType.REACTION_REVOKED
}
private fun isPollVotedMessage(currentMessage: MutableMap.MutableEntry<String, ChatMessage>): Boolean {
return currentMessage.value.systemMessageType == ChatMessage.SystemMessageType.POLL_VOTED
}
private fun startACall(isVoiceOnlyCall: Boolean, callWithoutNotification: Boolean) {
if (currentConversation?.canStartCall == false && currentConversation?.hasCall == false) {
Toast.makeText(context, R.string.startCallForbidden, Toast.LENGTH_LONG).show()