From 234a84ac045b3dd5cf922971708cbd72c4b95407 Mon Sep 17 00:00:00 2001 From: Nikolay Sinyov Date: Sat, 4 May 2024 21:00:20 +0300 Subject: [PATCH] Fixed merge --- qml/components/MessageListViewItem.qml | 3 ++- src/tdlibwrapper.cpp | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/qml/components/MessageListViewItem.qml b/qml/components/MessageListViewItem.qml index 683c0e2..a83d23e 100644 --- a/qml/components/MessageListViewItem.qml +++ b/qml/components/MessageListViewItem.qml @@ -151,7 +151,8 @@ ListItem { if (messageListItem.messageReactions) { messageListItem.messageReactions = null; - selectReactionBubble.visible = false; + } else if (messageListItem.chatReactions) { + messageListItem.messageReactions = chatReactions } else { selectReactionBubble.visible = !selectReactionBubble.visible; elementSelected(index); diff --git a/src/tdlibwrapper.cpp b/src/tdlibwrapper.cpp index 70dcf65..f4da7aa 100644 --- a/src/tdlibwrapper.cpp +++ b/src/tdlibwrapper.cpp @@ -1633,15 +1633,23 @@ QVariantMap TDLibWrapper::getChat(const QString &chatId) QStringList TDLibWrapper::getChatReactions(const QString &chatId) { +<<<<<<< HEAD LOG("Obtaining chat reactions for chat" << chatId); +======= +>>>>>>> 1ee8d13 (Adapt to changes in TdLib (#524)) const QVariant available_reactions(chats.value(chatId).toMap().value(CHAT_AVAILABLE_REACTIONS)); const QVariantMap map(available_reactions.toMap()); const QString reactions_type(map.value(_TYPE).toString()); if (reactions_type == CHAT_AVAILABLE_REACTIONS_ALL) { +<<<<<<< HEAD LOG("Chat uses all available reactions, currently available number" << activeEmojiReactions.size()); return activeEmojiReactions; } else if (reactions_type == CHAT_AVAILABLE_REACTIONS_SOME) { LOG("Chat uses reduced set of reactions"); +======= + return activeEmojiReactions; + } else if (reactions_type == CHAT_AVAILABLE_REACTIONS_SOME) { +>>>>>>> 1ee8d13 (Adapt to changes in TdLib (#524)) const QVariantList reactions(map.value(REACTIONS).toList()); const int n = reactions.count(); QStringList emojis; @@ -1663,6 +1671,7 @@ QStringList TDLibWrapper::getChatReactions(const QString &chatId) } } } +<<<<<<< HEAD LOG("Found emojis for this chat" << emojis.size()); return emojis; } else if (reactions_type.isEmpty()) { @@ -1670,6 +1679,12 @@ QStringList TDLibWrapper::getChatReactions(const QString &chatId) return available_reactions.toStringList(); } else { LOG("Unknown chat reaction type" << reactions_type); +======= + return emojis; + } else if (reactions_type.isEmpty()) { + return available_reactions.toStringList(); + } else { +>>>>>>> 1ee8d13 (Adapt to changes in TdLib (#524)) return QStringList(); } }