More tweaks for reactions
This commit is contained in:
parent
1c9fcac9cd
commit
ec972d7edc
5 changed files with 38 additions and 12 deletions
|
@ -115,6 +115,19 @@ ListItem {
|
|||
return interactionText;
|
||||
}
|
||||
|
||||
function openReactions() {
|
||||
if (messageListItem.chatReactions) {
|
||||
Debug.log("Using chat reactions")
|
||||
messageListItem.messageReactions = chatReactions
|
||||
showItemCompletelyTimer.requestedIndex = index;
|
||||
showItemCompletelyTimer.start();
|
||||
} else {
|
||||
Debug.log("Obtaining message reactions")
|
||||
tdLibWrapper.getMessageAvailableReactions(messageListItem.chatId, messageListItem.messageId);
|
||||
}
|
||||
selectReactionBubble.visible = false;
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if (messageListItem.precalculatedValues.pageIsSelecting) {
|
||||
page.toggleMessageSelection(myMessage);
|
||||
|
@ -134,10 +147,16 @@ ListItem {
|
|||
messageListItem.messageReactions = null;
|
||||
selectReactionBubble.visible = false;
|
||||
} else {
|
||||
if (messageListItem.chatReactions) {
|
||||
selectReactionBubble.visible = !selectReactionBubble.visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onDoubleClicked: {
|
||||
openReactions();
|
||||
}
|
||||
|
||||
onPressAndHold: {
|
||||
if (openMenuOnPressAndHold) {
|
||||
|
@ -643,6 +662,17 @@ ListItem {
|
|||
textFormat: Text.StyledText
|
||||
maximumLineCount: 1
|
||||
elide: Text.ElideRight
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
if (messageListItem.messageReactions) {
|
||||
messageListItem.messageReactions = null;
|
||||
selectReactionBubble.visible = false;
|
||||
} else {
|
||||
openReactions();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -672,16 +702,7 @@ ListItem {
|
|||
icon.source: "image://theme/icon-s-favorite"
|
||||
anchors.centerIn: selectReactionBubble
|
||||
onClicked: {
|
||||
if (messageListItem.chatReactions) {
|
||||
Debug.log("Using chat reactions")
|
||||
messageListItem.messageReactions = chatReactions
|
||||
showItemCompletelyTimer.requestedIndex = index;
|
||||
showItemCompletelyTimer.start();
|
||||
} else {
|
||||
Debug.log("Obtaining message reactions")
|
||||
tdLibWrapper.getMessageAvailableReactions(messageListItem.chatId, messageListItem.messageId);
|
||||
}
|
||||
selectReactionBubble.visible = false;
|
||||
openReactions();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -576,6 +576,9 @@ Page {
|
|||
onSponsoredMessageReceived: {
|
||||
chatPage.containsSponsoredMessages = true;
|
||||
}
|
||||
onReactionsUpdated: {
|
||||
availableReactions = tdLibWrapper.getChatReactions(chatInformation.id);
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
|
|
@ -12,7 +12,7 @@ Name: harbour-fernschreiber
|
|||
|
||||
Summary: Fernschreiber is a Telegram client for Aurora OS
|
||||
Version: 0.17
|
||||
Release: 7
|
||||
Release: 8
|
||||
Group: Qt/Qt
|
||||
License: LICENSE
|
||||
URL: http://werkwolf.eu/
|
||||
|
|
|
@ -2093,6 +2093,7 @@ void TDLibWrapper::handleActiveEmojiReactionsUpdated(const QStringList& emojis)
|
|||
if (activeEmojiReactions != emojis) {
|
||||
activeEmojiReactions = emojis;
|
||||
LOG(emojis.count() << "reaction(s) available");
|
||||
emit reactionsUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -339,6 +339,7 @@ signals:
|
|||
void chatUnreadMentionCountUpdated(qlonglong chatId, int unreadMentionCount);
|
||||
void chatUnreadReactionCountUpdated(qlonglong chatId, int unreadReactionCount);
|
||||
void tgUrlFound(const QString &tgUrl);
|
||||
void reactionsUpdated();
|
||||
|
||||
public slots:
|
||||
void handleVersionDetected(const QString &version);
|
||||
|
|
Loading…
Reference in a new issue