chore(MessageContextMenu): ensure chat tab is activated when attempting to send message

This is needed when accessing the context menu from the timeline status updates.
Previously, it'd only change the active channel because it assumed the user is already
in the chat view. This is no longer the case when in timeline view, so we need to make sure
we first navigate to the chat view.
This commit is contained in:
Pascal Precht 2020-12-10 12:41:28 +01:00 committed by Pascal Precht
parent c2f2b7e6cd
commit bb6bcc640a
1 changed files with 6 additions and 1 deletions

View File

@ -130,7 +130,12 @@ PopupMenu {
//% "Reply to"
qsTrId("reply-to")
onTriggered: {
messageContextMenu.isProfile ? chatsModel.joinChat(fromAuthor, Constants.chatTypeOneToOne) : showReplyArea()
if (messageContextMenu.isProfile) {
appMain.changeAppSection(Constants.chat)
chatsModel.joinChat(fromAuthor, Constants.chatTypeOneToOne)
} else {
showReplyArea()
}
messageContextMenu.close()
}
icon.source: "../../../img/messageActive.svg"