From 22429689e32d038979a89f24e91b327203968f47 Mon Sep 17 00:00:00 2001 From: Alexandra Betouni <31625338+alexandraB99@users.noreply.github.com> Date: Thu, 21 Oct 2021 03:41:54 +0300 Subject: [PATCH] refactor(desktop/chat) Cleaning up panels --- ui/app/AppLayouts/Chat/ChatLayout.qml | 5 +- .../FetchMoreMessagesButton.qml | 6 +- .../controls/{messages => }/GapComponent.qml | 5 +- .../AppLayouts/Chat/controls/UserDelegate.qml | 3 +- .../communities/MembershipRadioButton.qml | 55 -------- .../AppLayouts/Chat/panels/ChatReplyPanel.qml | 17 +-- .../Chat/panels/EmojiReactionsPanel.qml | 8 +- .../panels/FetchMoreMessagesMenuPanel.qml | 63 --------- .../Chat/panels/StatusUpdatePanel.qml | 12 +- .../Chat/panels/TransactionBubblePanel.qml | 13 +- .../CommunityProfilePopupOverviewPanel.qml | 4 +- .../communities/CommunityUserListPanel.qml | 2 +- .../CommunityWelcomeBannerPanel.qml | 7 +- .../Chat/popups/PinnedMessagesPopup.qml | 3 +- .../community/CommunityProfilePopup.qml | 5 + ui/app/AppLayouts/Chat/stores/RootStore.qml | 29 +++++ .../Chat/views/ActivityCenterGroupRequest.qml | 2 +- .../AppLayouts/Chat/views/ChatColumnView.qml | 3 +- .../Chat/views/ChatContextMenuView.qml | 2 +- ui/app/AppLayouts/Chat/views/ChatTimeView.qml | 2 +- .../Chat/views/CommunityColumnView.qml | 5 +- .../Chat/views/CompactMessageView.qml | 6 +- .../Chat/views/ContactsColumnView.qml | 17 ++- .../InvitationBubbleView.qml} | 35 ++--- .../Chat/views/LinksMessageView.qml | 4 +- .../MessageContextMenuView.qml} | 83 ++++++------ ui/app/AppLayouts/Chat/views/MessageView.qml | 123 ++---------------- .../Chat/views/NormalMessageView.qml | 3 +- .../AppLayouts/Profile/views/EnsListView.qml | 4 +- ui/app/AppLayouts/Timeline/TimelineLayout.qml | 4 +- ui/shared/status/StatusStickersPopup.qml | 2 +- 31 files changed, 188 insertions(+), 344 deletions(-) rename ui/app/AppLayouts/Chat/controls/{messages => }/FetchMoreMessagesButton.qml (95%) rename ui/app/AppLayouts/Chat/controls/{messages => }/GapComponent.qml (92%) delete mode 100644 ui/app/AppLayouts/Chat/controls/communities/MembershipRadioButton.qml delete mode 100644 ui/app/AppLayouts/Chat/panels/FetchMoreMessagesMenuPanel.qml rename ui/app/AppLayouts/Chat/{panels/InvitationBubblePanel.qml => views/InvitationBubbleView.qml} (91%) rename ui/app/AppLayouts/Chat/{panels/MessageContextMenuPanel.qml => views/MessageContextMenuView.qml} (79%) diff --git a/ui/app/AppLayouts/Chat/ChatLayout.qml b/ui/app/AppLayouts/Chat/ChatLayout.qml index 79542ee5a7..f40bd4d715 100644 --- a/ui/app/AppLayouts/Chat/ChatLayout.qml +++ b/ui/app/AppLayouts/Chat/ChatLayout.qml @@ -181,6 +181,7 @@ StatusAppThreePanelLayout { messageContextMenu: quickActionMessageOptionsMenu profilePubKey: profileModel.profile.pubKey contactsList: profileModel.contacts.list + community: chatsModel.communities.activeCommunity } } @@ -208,6 +209,7 @@ StatusAppThreePanelLayout { Component { id: communtiyColumnComponent CommunityColumnView { + rootStore: chatColumn.rootStore pinnedMessagesPopupComponent: chatColumn.pinnedMessagesPopupComponent } } @@ -243,8 +245,9 @@ StatusAppThreePanelLayout { } } - MessageContextMenuPanel { + MessageContextMenuView { id: quickActionMessageOptionsMenu + store: chatColumn.rootStore reactionModel: chatColumn.rootStore.emojiReactionsModel } } diff --git a/ui/app/AppLayouts/Chat/controls/messages/FetchMoreMessagesButton.qml b/ui/app/AppLayouts/Chat/controls/FetchMoreMessagesButton.qml similarity index 95% rename from ui/app/AppLayouts/Chat/controls/messages/FetchMoreMessagesButton.qml rename to ui/app/AppLayouts/Chat/controls/FetchMoreMessagesButton.qml index 7280f6c999..aeba566432 100644 --- a/ui/app/AppLayouts/Chat/controls/messages/FetchMoreMessagesButton.qml +++ b/ui/app/AppLayouts/Chat/controls/FetchMoreMessagesButton.qml @@ -2,7 +2,7 @@ import QtQuick 2.13 import StatusQ.Components 0.1 -import "../../../../../shared/panels" +import "../../../../shared/panels" import utils 1.0 @@ -11,8 +11,8 @@ Item { height: childrenRect.height + Style.current.smallPadding * 2 anchors.left: parent.left anchors.right: parent.right - property int nextMessageIndex - property string nextMsgTimestamp +// property int nextMessageIndex +// property string nextMsgTimestamp signal clicked() signal timerTriggered() Timer { diff --git a/ui/app/AppLayouts/Chat/controls/messages/GapComponent.qml b/ui/app/AppLayouts/Chat/controls/GapComponent.qml similarity index 92% rename from ui/app/AppLayouts/Chat/controls/messages/GapComponent.qml rename to ui/app/AppLayouts/Chat/controls/GapComponent.qml index 97c29d498c..a5e1f5138e 100644 --- a/ui/app/AppLayouts/Chat/controls/messages/GapComponent.qml +++ b/ui/app/AppLayouts/Chat/controls/GapComponent.qml @@ -1,7 +1,6 @@ import QtQuick 2.13 -import "../../../../../shared" -import "../../../../../shared/panels" -import "../../../../../shared/status/core" +import "../../../../shared" +import "../../../../shared/panels" import utils 1.0 diff --git a/ui/app/AppLayouts/Chat/controls/UserDelegate.qml b/ui/app/AppLayouts/Chat/controls/UserDelegate.qml index 249489a2f3..7e48f3d4e2 100644 --- a/ui/app/AppLayouts/Chat/controls/UserDelegate.qml +++ b/ui/app/AppLayouts/Chat/controls/UserDelegate.qml @@ -48,7 +48,8 @@ Item { target: wrapper.contactsList onContactChanged: { if (pubkey === wrapper.publicKey) { - wrapper.profileImage = appMain.getProfileImage(wrapper.publicKey) + wrapper.profileImage = !!appMain.getProfileImage(wrapper.publicKey) ? + appMain.getProfileImage(wrapper.publicKey) : "" } } } diff --git a/ui/app/AppLayouts/Chat/controls/communities/MembershipRadioButton.qml b/ui/app/AppLayouts/Chat/controls/communities/MembershipRadioButton.qml deleted file mode 100644 index 6385c7bd42..0000000000 --- a/ui/app/AppLayouts/Chat/controls/communities/MembershipRadioButton.qml +++ /dev/null @@ -1,55 +0,0 @@ -import QtQuick 2.13 -import QtQuick.Controls 2.13 -import QtGraphicalEffects 1.13 -import "../../../../shared" -import "../../../../shared/panels" -import "../../../../shared/status" - -import utils 1.0 -import "." - -Item { - property string text - property string description - property var buttonGroup - property bool checked: false - property bool hideSeparator: false - signal radioCheckedChanged(bool checked) - - id: root - width: parent.width - height: childrenRect.height - - StatusRadioButtonRow { - id: radioBtn - text: root.text - buttonGroup: root.buttonGroup - checked: root.checked - onRadioCheckedChanged: { - root.radioCheckedChanged(checked) - } - } - - StyledText { - id: radioDesc - text: root.description - anchors.top: radioBtn.bottom - anchors.topMargin: Style.current.halfPadding - anchors.left: parent.left - anchors.right: parent.right - anchors.rightMargin: 100 - font.pixelSize: 13 - color: Style.current.secondaryText - wrapMode: Text.WordWrap - } - - Separator { - visible: !root.hideSeparator - anchors.top: radioDesc.bottom - anchors.topMargin: visible ? Style.current.halfPadding : 0 - anchors.left: parent.left - anchors.leftMargin: -Style.current.halfPadding - anchors.right: parent.right - anchors.rightMargin: -Style.current.halfPadding - } -} diff --git a/ui/app/AppLayouts/Chat/panels/ChatReplyPanel.qml b/ui/app/AppLayouts/Chat/panels/ChatReplyPanel.qml index 8fe6f997e3..f0b6354437 100644 --- a/ui/app/AppLayouts/Chat/panels/ChatReplyPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/ChatReplyPanel.qml @@ -14,10 +14,18 @@ Loader { id: root property int nameMargin: 6 -// property bool isCurrentUser: false property int textFieldWidth: item ? item.textField.width : 0 property int textFieldImplicitWidth: 0 property int authorWidth: item ? item.authorMetrics.width : 0 + property bool longReply: false + property color elementsColor: isCurrentUser ? Style.current.chatReplyCurrentUser : Style.current.secondaryText + property var container + property int chatHorizontalPadding + property var stickerData + signal clickMessage(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly, bool hideEmojiPicker, bool isReply) + +// TODO bring those back and remove dynamic scoping +// property bool isCurrentUser: false // property int repliedMessageType // property string repliedMessageImage // property string repliedMessageUserIdenticon @@ -25,15 +33,8 @@ Loader { // property string repliedMessageUserImage // property string repliedMessageAuthor // property string repliedMessageContent - property bool longReply: false - property color elementsColor: isCurrentUser ? Style.current.chatReplyCurrentUser : Style.current.secondaryText - property var container - property int chatHorizontalPadding // property string responseTo: "" - property var stickerData - // signal scrollToBottom(bool isit, var container) - signal clickMessage(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly, bool hideEmojiPicker, bool isReply) sourceComponent: Component { Item { diff --git a/ui/app/AppLayouts/Chat/panels/EmojiReactionsPanel.qml b/ui/app/AppLayouts/Chat/panels/EmojiReactionsPanel.qml index 250ec55acc..87725344fc 100644 --- a/ui/app/AppLayouts/Chat/panels/EmojiReactionsPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/EmojiReactionsPanel.qml @@ -14,14 +14,16 @@ Item { width: childrenRect.width property int imageMargin: 4 -// property bool isCurrentUser -// property var emojiReactionsModel -// property bool isMessageActive signal addEmojiClicked() signal hoverChanged(bool hovered) signal toggleReaction(int emojiID) signal setMessageActive(string messageId, bool active) +// TODO bring those back and remove dynamic scoping +// property bool isCurrentUser +// property var emojiReactionsModel +// property bool isMessageActive + Row { spacing: root.imageMargin diff --git a/ui/app/AppLayouts/Chat/panels/FetchMoreMessagesMenuPanel.qml b/ui/app/AppLayouts/Chat/panels/FetchMoreMessagesMenuPanel.qml deleted file mode 100644 index 0ba3d8189a..0000000000 --- a/ui/app/AppLayouts/Chat/panels/FetchMoreMessagesMenuPanel.qml +++ /dev/null @@ -1,63 +0,0 @@ -import QtQuick 2.13 -import QtQuick.Controls 2.13 -import QtQuick.Layouts 1.13 - -import "../../../../shared" -import "../../../../shared/popups" -import "../../../../shared/status" - -import utils 1.0 - -// TODO: replace with StatusPopupmenu -//Todo Unsed? - -PopupMenu { - //% "Fetch Messages" - title: qsTrId("fetch-messages") - - // TODO call fetch for the wanted duration - //% "Last 24 hours" - Action { - text: qsTrId("last-24-hours"); - icon.width: 0; - onTriggered: { - chatsModel.requestMoreMessages(Constants.fetchRangeLast24Hours) - timer.setTimeout(function(){ - chatsModel.messageView.hideLoadingIndicator() - }, 3000); - } - } - //% "Last 2 days" - Action { - text: qsTrId("last-2-days"); - icon.width: 0; - onTriggered: { - chatsModel.requestMoreMessages(Constants.fetchRangeLast2Days) - timer.setTimeout(function(){ - chatsModel.messageView.hideLoadingIndicator() - }, 4000); - } - } - //% "Last 3 days" - Action { - text: qsTrId("last-3-days"); - icon.width: 0; - onTriggered: { - chatsModel.requestMoreMessages(Constants.fetchRangeLast3Days) - timer.setTimeout(function(){ - chatsModel.messageView.hideLoadingIndicator() - }, 5000); - } - } - //% "Last 7 days" - Action { - text: qsTrId("last-7-days"); - icon.width: 0; - onTriggered: { - chatsModel.requestMoreMessages(Constants.fetchRangeLast7Days) - timer.setTimeout(function(){ - chatsModel.messageView.hideLoadingIndicator() - }, 7000); - } - } -} diff --git a/ui/app/AppLayouts/Chat/panels/StatusUpdatePanel.qml b/ui/app/AppLayouts/Chat/panels/StatusUpdatePanel.qml index c1530faf72..8551252371 100644 --- a/ui/app/AppLayouts/Chat/panels/StatusUpdatePanel.qml +++ b/ui/app/AppLayouts/Chat/panels/StatusUpdatePanel.qml @@ -20,6 +20,12 @@ MouseArea { property int statusAgeEpoch: 0 property var messageContextMenu + signal userNameClicked(bool isProfileClick) + signal setMessageActive(string messageId, bool active) + signal emojiBtnClicked(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly) + signal clickMessage(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly, bool hideEmojiPicker, bool isReply) + +// TODO bring those back and remove dynamic scoping // property var emojiReactionsModel // property string timestamp: "" // property bool isCurrentUser: false @@ -31,10 +37,6 @@ MouseArea { // property bool isMessage: false // property string profileImageSource: "" // property string userIdenticon: "" - signal userNameClicked(bool isProfileClick) - signal setMessageActive(string messageId, bool active) - signal emojiBtnClicked(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly) - signal clickMessage(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly, bool hideEmojiPicker, bool isReply) anchors.top: parent.top anchors.topMargin: 0 @@ -100,7 +102,7 @@ MouseArea { anchors.verticalCenter: chatName.verticalCenter anchors.left: chatName.right anchors.leftMargin: Style.current.halfPadding - timestamp: root.timestamp + //timestamp: timestamp } ChatTextView { diff --git a/ui/app/AppLayouts/Chat/panels/TransactionBubblePanel.qml b/ui/app/AppLayouts/Chat/panels/TransactionBubblePanel.qml index f3f176cbdb..94e9cbc2c6 100644 --- a/ui/app/AppLayouts/Chat/panels/TransactionBubblePanel.qml +++ b/ui/app/AppLayouts/Chat/panels/TransactionBubblePanel.qml @@ -8,6 +8,10 @@ import "../controls" import "../views" Item { + id: root + width: rectangleBubble.width + height: rectangleBubble.height + property var commandParametersObject: { try { return JSON.parse(commandParameters) @@ -30,6 +34,7 @@ Item { property var focusedAccount property string activeChannelName property string activeChannelIdenticon + property var balanceView signal getGasPrice() signal sendTransactionClicked(string fromAddress) property var token: JSON.parse(commandParametersObject.contract) // TODO: handle {} @@ -39,8 +44,8 @@ Item { if (!tokenAmount || !token.symbol) { return "0" } - var defaultFiatSymbol = walletModel.balanceView.defaultCurrency - return walletModel.balanceView.getFiatValue(tokenAmount, token.symbol, defaultFiatSymbol) + " " + defaultFiatSymbol.toUpperCase() + var defaultFiatSymbol = root.balanceView.defaultCurrency + return root.balanceView.getFiatValue(tokenAmount, token.symbol, defaultFiatSymbol) + " " + defaultFiatSymbol.toUpperCase() } property int state: commandParametersObject.commandState @@ -55,10 +60,6 @@ Item { } } - id: root - width: rectangleBubble.width - height: rectangleBubble.height - Rectangle { id: rectangleBubble width: (bubbleLoader.active ? bubbleLoader.width : valueContainer.width) diff --git a/ui/app/AppLayouts/Chat/panels/communities/CommunityProfilePopupOverviewPanel.qml b/ui/app/AppLayouts/Chat/panels/communities/CommunityProfilePopupOverviewPanel.qml index 7583fd9e62..4cce233cae 100644 --- a/ui/app/AppLayouts/Chat/panels/communities/CommunityProfilePopupOverviewPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/communities/CommunityProfilePopupOverviewPanel.qml @@ -23,6 +23,7 @@ Column { signal editButtonClicked() signal transferOwnershipButtonClicked() signal leaveButtonClicked() + signal copyToClipboard(string link) Item { height: Math.max(46, communityDescription.height + 16) @@ -54,7 +55,8 @@ Column { icon.name: "copy" iconButton.onClicked: { let link = `${Constants.communityLinkPrefix}${root.community.id}` - chatsModel.copyToClipboard(link) + //chatsModel.copyToClipboard(link) + root.copyToClipboard(link); tooltip.visible = !tooltip.visible } width: parent.width diff --git a/ui/app/AppLayouts/Chat/panels/communities/CommunityUserListPanel.qml b/ui/app/AppLayouts/Chat/panels/communities/CommunityUserListPanel.qml index 9b3b74b127..cb9faa46ca 100644 --- a/ui/app/AppLayouts/Chat/panels/communities/CommunityUserListPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/communities/CommunityUserListPanel.qml @@ -24,7 +24,7 @@ Item { property var contactsList property string profilePubKey property var messageContextMenu - property QtObject community: chatsModel.communities.activeCommunity + property var community StyledText { id: titleText diff --git a/ui/app/AppLayouts/Chat/panels/communities/CommunityWelcomeBannerPanel.qml b/ui/app/AppLayouts/Chat/panels/communities/CommunityWelcomeBannerPanel.qml index 033c4cb835..29b989dfa3 100644 --- a/ui/app/AppLayouts/Chat/panels/communities/CommunityWelcomeBannerPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/communities/CommunityWelcomeBannerPanel.qml @@ -21,6 +21,7 @@ Rectangle { border.color: Style.current.border radius: 16 color: Style.current.transparent + property var activeCommunity MouseArea { anchors.fill: parent @@ -55,7 +56,7 @@ Rectangle { type: StatusQControls.StatusFlatRoundButton.Type.Tertiary onClicked: { let hiddenBannerIds = appSettings.hiddenCommunityWelcomeBanners - hiddenBannerIds.push(chatsModel.communities.activeCommunity.id) + hiddenBannerIds.push(root.activeCommunity.id) appSettings.hiddenCommunityWelcomeBanners = hiddenBannerIds root.visible = false } @@ -85,7 +86,7 @@ Rectangle { anchors.bottom: manageBtn.top anchors.bottomMargin: Style.current.halfPadding onClicked: openPopup(inviteFriendsToCommunityPopup, { - community: chatsModel.communities.activeCommunity + community: root.activeCommunity }) } @@ -97,7 +98,7 @@ Rectangle { anchors.bottom: parent.bottom anchors.bottomMargin: Style.current.padding onClicked: openPopup(communityProfilePopup, { - community: chatsModel.communities.activeCommunity + community: root.activeCommunity }) } } diff --git a/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml b/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml index addcd98eb3..1cefcf1157 100644 --- a/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml @@ -183,10 +183,11 @@ ModalPopup { messageStore.showEdit = false; messageStore.messageContextMenu = msgContextMenu; } - MessageContextMenuPanel { + MessageContextMenuView { id: msgContextMenu pinnedPopup: true pinnedMessage: true + store: popup.rootStore reactionModel: popup.rootStore.emojiReactionsModel onShouldCloseParentPopup: { messageDelegate.listView.closePopup(); diff --git a/ui/app/AppLayouts/Chat/popups/community/CommunityProfilePopup.qml b/ui/app/AppLayouts/Chat/popups/community/CommunityProfilePopup.qml index abb3aab866..237b658f08 100644 --- a/ui/app/AppLayouts/Chat/popups/community/CommunityProfilePopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/CommunityProfilePopup.qml @@ -71,6 +71,11 @@ StatusModal { chatsModel.communities.leaveCommunity(popup.community.id) popup.close() } + onCopyToClipboard: { + //TODO + //root.store.copyToClipboard(link); + chatsModel.copyToClipboard(link); + } } } diff --git a/ui/app/AppLayouts/Chat/stores/RootStore.qml b/ui/app/AppLayouts/Chat/stores/RootStore.qml index f5daa78945..11161243ea 100644 --- a/ui/app/AppLayouts/Chat/stores/RootStore.qml +++ b/ui/app/AppLayouts/Chat/stores/RootStore.qml @@ -11,6 +11,16 @@ QtObject { property var walletModelInst: walletModel property var profileModelInst: profileModel + property var activeCommunity: chatsModelInst.communities.activeCommunity + + function copyToClipboard(text) { + chatsModelInst.copyToClipboard(text); + } + + function deleteMessage(messageId) { + chatsModelInst.messageView.deleteMessage(messageId); + } + function lastTwoItems(nodes) { //% " and " return nodes.join(qsTrId("-and-")); @@ -50,4 +60,23 @@ QtObject { } return tooltip } + + function getCommunity(communityId) { + try { + const communityJson = chatsModelInst.communities.list.getCommunityByIdJson(communityId); + if (!communityJson) { + return null; + } + + let community = JSON.parse(communityJson); + if (community) { + community.nbMembers = community.members.length; + } + return community + } catch (e) { + console.error("Error parsing community", e); + } + + return null; + } } diff --git a/ui/app/AppLayouts/Chat/views/ActivityCenterGroupRequest.qml b/ui/app/AppLayouts/Chat/views/ActivityCenterGroupRequest.qml index cbd7ca1ef8..0447d94765 100644 --- a/ui/app/AppLayouts/Chat/views/ActivityCenterGroupRequest.qml +++ b/ui/app/AppLayouts/Chat/views/ActivityCenterGroupRequest.qml @@ -97,7 +97,7 @@ Item { font.pixelSize: 10 visible: true color: Style.current.secondaryText - timestamp: root.timestamp + //timestamp: root.timestamp } } diff --git a/ui/app/AppLayouts/Chat/views/ChatColumnView.qml b/ui/app/AppLayouts/Chat/views/ChatColumnView.qml index ed2872b515..9a060baa8c 100644 --- a/ui/app/AppLayouts/Chat/views/ChatColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatColumnView.qml @@ -110,8 +110,9 @@ Item { } } - MessageContextMenuPanel { + MessageContextMenuView { id: contextmenu + store: chatColumnLayout.rootStore reactionModel: chatColumnLayout.rootStore.emojiReactionsModel } diff --git a/ui/app/AppLayouts/Chat/views/ChatContextMenuView.qml b/ui/app/AppLayouts/Chat/views/ChatContextMenuView.qml index 5768ec2aa6..7972a53ea4 100644 --- a/ui/app/AppLayouts/Chat/views/ChatContextMenuView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatContextMenuView.qml @@ -158,7 +158,7 @@ StatusPopupMenu { Component { id: deleteChatConfirmationDialogComponent ConfirmationDialog { - property string chatId: chatItem.id + property string chatId: !!chatItem ? chatItem.id : "" btnType: "warn" header.title: communityActive ? qsTr("Delete #%1").arg(chatItem.name) : chatItem && chatItem.chatType === Constants.chatTypeOneToOne ? diff --git a/ui/app/AppLayouts/Chat/views/ChatTimeView.qml b/ui/app/AppLayouts/Chat/views/ChatTimeView.qml index 39d340ff7f..0a14ab0e73 100644 --- a/ui/app/AppLayouts/Chat/views/ChatTimeView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatTimeView.qml @@ -7,7 +7,7 @@ import utils 1.0 StyledText { id: chatTime - property string timestamp + //property string timestamp visible: chatTime.messageStore.isMessage color: Style.current.secondaryText text: Utils.formatTime(timestamp) diff --git a/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml b/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml index 70db64d90a..bff1bef21d 100644 --- a/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml @@ -23,6 +23,7 @@ Item { // TODO unhardcode property int chatGroupsListViewCount: communityChatListAndCategories.chatList.count property Component pinnedMessagesPopupComponent + property var rootStore StatusChatInfoToolBar { id: communityHeader @@ -240,7 +241,9 @@ Item { anchors.top: communityChatListAndCategories.bottom anchors.topMargin: active ? Style.current.padding : 0 sourceComponent: Component { - CommunityWelcomeBannerPanel {} + CommunityWelcomeBannerPanel { + activeCommunity: rootStore.activeCommunity + } } } diff --git a/ui/app/AppLayouts/Chat/views/CompactMessageView.qml b/ui/app/AppLayouts/Chat/views/CompactMessageView.qml index c3474ce195..3506d20148 100644 --- a/ui/app/AppLayouts/Chat/views/CompactMessageView.qml +++ b/ui/app/AppLayouts/Chat/views/CompactMessageView.qml @@ -297,7 +297,7 @@ Item { anchors.left: chatName.right anchors.leftMargin: 4 color: Style.current.secondaryText - timestamp: timestamp + //timestamp: timestamp } Loader { @@ -565,6 +565,7 @@ Item { anchors.topMargin: active ? (chatName.visible ? 4 : 6) : 0 sourceComponent: Component { TransactionBubblePanel { + balanceView: root.store.walletModelInst.balanceView focusedAccount: root.store.walletModelInst.accountsView.focusedAccount activeChannelName: root.store.chatsModelInst.channelView.activeChannel.name activeChannelIdenticon: root.store.chatsModelInst.channelView.activeChannel.identicon @@ -585,7 +586,8 @@ Item { anchors.topMargin: active ? 8 : 0 sourceComponent: Component { id: invitationBubble - InvitationBubblePanel { + InvitationBubbleView { + store: root.store communityId: container.communityId } } diff --git a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml index 98d57953a6..571ee7453d 100644 --- a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml @@ -235,14 +235,17 @@ Item { target: profileModel.contacts.list onContactChanged: { for (var i = 0; i < channelList.chatListItems.count; i++) { - let chatItem = channelList.statusChatListItems.model.itemAt(i); - if (chatItem.chatId === pubkey) { - let profileImage = appMain.getProfileImage(pubkey) - if (!!profileImage) { - chatItem.image.isIdenticon = false - chatItem.image.source = profileImage + let chatItem = !!channelList.statusChatListItems.model.itemAt(i) ? + channelList.statusChatListItems.model.itemAt(i) : null + if (!!chatItem) { + if (chatItem.chatId === pubkey) { + let profileImage = appMain.getProfileImage(pubkey) + if (!!profileImage) { + chatItem.image.isIdenticon = false + chatItem.image.source = profileImage + } + break; } - break; } } } diff --git a/ui/app/AppLayouts/Chat/panels/InvitationBubblePanel.qml b/ui/app/AppLayouts/Chat/views/InvitationBubbleView.qml similarity index 91% rename from ui/app/AppLayouts/Chat/panels/InvitationBubblePanel.qml rename to ui/app/AppLayouts/Chat/views/InvitationBubbleView.qml index fa4f7c03e6..34133f4619 100644 --- a/ui/app/AppLayouts/Chat/panels/InvitationBubblePanel.qml +++ b/ui/app/AppLayouts/Chat/views/InvitationBubbleView.qml @@ -11,19 +11,20 @@ import "../../../../shared/panels" import "../../../../shared/popups" Item { - property string communityId - property var invitedCommunity - property int innerMargin: 12 - property bool isLink: false - id: root anchors.left: parent.left height: rectangleBubbleLoader.height width: rectangleBubbleLoader.width + property string communityId + property var invitedCommunity + property int innerMargin: 12 + property bool isLink: false + property var store + function getCommunity() { try { - const communityJson = chatsModel.communities.list.getCommunityByIdJson(communityId) + const communityJson = root.store.chatsModelInst.communities.list.getCommunityByIdJson(communityId) if (!communityJson) { return null } @@ -45,7 +46,7 @@ Item { } Connections { - target: chatsModel.communities + target: root.store.chatsModelInst.communities onCommunityChanged: function (communityId) { if (communityId === root.communityId) { root.invitedCommunity = getCommunity() @@ -87,7 +88,7 @@ Item { Rectangle { id: rectangleBubble property alias button: joinBtn - property bool isPendingRequest: chatsModel.communities.isCommunityRequestPending(communityId) + property bool isPendingRequest: root.store.chatsModelInst.communities.isCommunityRequestPending(communityId) width: 270 height: title.height + title.anchors.topMargin + invitedYou.height + invitedYou.anchors.topMargin + @@ -105,7 +106,7 @@ Item { states: [ State { name: "requiresEns" - when: invitedCommunity.ensOnly && !profileModel.profile.ensVerified + when: invitedCommunity.ensOnly && !root.store.profileModelInst.profile.ensVerified PropertyChanges { target: joinBtn //% "Membership requires an ENS username" @@ -172,7 +173,7 @@ Item { ] Connections { - target: chatsModel.communities + target: root.store.chatsModelInst.communities onMembershipRequestChanged: function(communityId, communityName, requestAccepted) { if (communityId === root.communityId) { rectangleBubble.isPendingRequest = false @@ -200,10 +201,10 @@ Item { StatusBaseText { id: invitedYou text: { - if (chatsModel.channelView.activeChannel.chatType === Constants.chatTypeOneToOne) { + if (root.store.chatsModelInst.channelView.activeChannel.chatType === Constants.chatTypeOneToOne) { return isCurrentUser ? //% "You invited %1 to join a community" - qsTrId("you-invited--1-to-join-a-community").arg(chatsModel.userNameOrAlias(chatsModel.channelView.activeChannel.id)) + qsTrId("you-invited--1-to-join-a-community").arg(root.store.chatsModelInst.userNameOrAlias(root.store.chatsModelInst.channelView.activeChannel.id)) //% "%1 invited you to join a community" : qsTrId("-1-invited-you-to-join-a-community").arg(displayUserName) } else { @@ -301,16 +302,16 @@ Item { let error if (rectangleBubble.state === "joined") { - chatsModel.communities.setActiveCommunity(communityId); + root.store.chatsModelInst.communities.setActiveCommunity(communityId); return } else if (rectangleBubble.state === "unjoined") { - error = chatsModel.communities.joinCommunity(communityId, true) + error = root.store.chatsModelInst.communities.joinCommunity(communityId, true) } else if (rectangleBubble.state === "requestToJoin") { - error = chatsModel.communities.requestToJoinCommunity(communityId, - profileModel.profile.ensVerified ? profileModel.profile.username : "") + error = root.store.chatsModelInst.communities.requestToJoinCommunity(communityId, + root.store.profileModelInst.profile.ensVerified ? root.store.profileModelInst.profile.username : "") if (!error) { - rectangleBubble.isPendingRequest = chatsModel.communities.isCommunityRequestPending(communityId) + rectangleBubble.isPendingRequest = root.store.chatsModelInst.communities.isCommunityRequestPending(communityId) } } diff --git a/ui/app/AppLayouts/Chat/views/LinksMessageView.qml b/ui/app/AppLayouts/Chat/views/LinksMessageView.qml index 479fc384fc..361121c6a7 100644 --- a/ui/app/AppLayouts/Chat/views/LinksMessageView.qml +++ b/ui/app/AppLayouts/Chat/views/LinksMessageView.qml @@ -19,6 +19,7 @@ Column { property var container property bool isCurrentUser: false property bool isImageLink: false + property var rootStore readonly property string uuid: Utils.uuid() spacing: Style.current.halfPadding @@ -210,7 +211,8 @@ Column { Component { id: invitationBubble - InvitationBubblePanel { + InvitationBubbleView { + store: root.rootStore communityId: linkData.communityId isLink: true anchors.left: parent.left diff --git a/ui/app/AppLayouts/Chat/panels/MessageContextMenuPanel.qml b/ui/app/AppLayouts/Chat/views/MessageContextMenuView.qml similarity index 79% rename from ui/app/AppLayouts/Chat/panels/MessageContextMenuPanel.qml rename to ui/app/AppLayouts/Chat/views/MessageContextMenuView.qml index 5346d90b71..4569961004 100644 --- a/ui/app/AppLayouts/Chat/panels/MessageContextMenuPanel.qml +++ b/ui/app/AppLayouts/Chat/views/MessageContextMenuView.qml @@ -15,9 +15,10 @@ import "../../../../shared/status" import "../controls" StatusPopupMenu { - id: messageContextMenu + id: root width: emojiContainer.visible ? emojiContainer.width : 176 + property var store property string messageId property int contentType property bool isProfile: false @@ -43,16 +44,16 @@ StatusPopupMenu { property var setXPosition: function() {return 0} property var setYPosition: function() {return 0} property bool canPin: { - const nbPinnedMessages = chatsModel.messageView.pinnedMessagesList.count + const nbPinnedMessages = root.store.chatsModelInst.messageView.pinnedMessagesList.count return nbPinnedMessages < Constants.maxNumberOfPins } onHeightChanged: { - messageContextMenu.y = setYPosition() + root.y = setYPosition() } onWidthChanged: { - messageContextMenu.x = setXPosition() + root.x = setXPosition() } signal shouldCloseParentPopup @@ -72,9 +73,9 @@ StatusPopupMenu { emojiReactionsReactedByUser = newEmojiReactions; /* // copy link feature not ready yet - const numLinkUrls = messageContextMenu.linkUrls.split(" ").length + const numLinkUrls = root.linkUrls.split(" ").length copyLinkMenu.enabled = numLinkUrls > 1 - copyLinkAction.enabled = !!messageContextMenu.linkUrls && numLinkUrls === 1 && !emojiOnly && !messageContextMenu.isProfile + copyLinkAction.enabled = !!root.linkUrls && numLinkUrls === 1 && !emojiOnly && !root.isProfile */ popup() } @@ -83,23 +84,23 @@ StatusPopupMenu { id: emojiContainer width: emojiRow.width height: visible ? emojiRow.height : 0 - visible: !hideEmojiPicker && (messageContextMenu.emojiOnly || !messageContextMenu.isProfile) + visible: !hideEmojiPicker && (root.emojiOnly || !root.isProfile) Row { id: emojiRow spacing: Style.current.halfPadding leftPadding: Style.current.halfPadding rightPadding: Style.current.halfPadding - bottomPadding: messageContextMenu.emojiOnly ? 0 : Style.current.padding + bottomPadding: root.emojiOnly ? 0 : Style.current.padding Repeater { - model: messageContextMenu.reactionModel + model: root.reactionModel delegate: EmojiReaction { source: Style.svg(filename) emojiId: model.emojiId - reactedByUser: !!messageContextMenu.emojiReactionsReactedByUser[model.emojiId] + reactedByUser: !!root.emojiReactionsReactedByUser[model.emojiId] onCloseModal: { chatsModel.toggleReaction(SelectedMessage.messageId, emojiId) - messageContextMenu.close() + root.close() } } } @@ -108,7 +109,7 @@ StatusPopupMenu { Item { id: profileHeader - visible: messageContextMenu.isProfile + visible: root.isProfile width: parent.width height: visible ? profileImage.height + username.height + Style.current.padding : 0 Rectangle { @@ -128,7 +129,7 @@ StatusPopupMenu { StyledText { id: username - text: Utils.removeStatusEns(isCurrentUser ? profileModel.ens.preferredUsername || userName : userName) + text: Utils.removeStatusEns(isCurrentUser ? root.store.profileModelInst.ens.preferredUsername || userName : userName) elide: Text.ElideRight maximumLineCount: 3 horizontalAlignment: Text.AlignHCenter @@ -150,14 +151,14 @@ StatusPopupMenu { cursorShape: Qt.PointingHandCursor onClicked: { openProfilePopup(userName, fromAuthor, identicon); - messageContextMenu.close() + root.close() } } } Separator { anchors.bottom: viewProfileAction.top - visible: !messageContextMenu.emojiOnly && !messageContextMenu.hideEmojiPicker + visible: !root.emojiOnly && !root.hideEmojiPicker } /* // copy link feature not ready yet @@ -166,8 +167,8 @@ StatusPopupMenu { //% "Copy link" text: qsTrId("copy-link") onTriggered: { - chatsModel.copyToClipboard(linkUrls.split(" ")[0]) - messageContextMenu.close() + root.store.chatsModelInst.copyToClipboard(linkUrls.split(" ")[0]) + root.close() } icon.name: "link" enabled: false @@ -181,13 +182,13 @@ StatusPopupMenu { Repeater { id: linksRepeater - model: messageContextMenu.linkUrls.split(" ") + model: root.linkUrls.split(" ") delegate: MenuItem { id: popupMenuItem text: modelData onTriggered: { - chatsModel.copyToClipboard(modelData) - messageContextMenu.close() + root.store.chatsModelInst.copyToClipboard(modelData) + root.close() } contentItem: StyledText { text: popupMenuItem.text @@ -211,8 +212,8 @@ StatusPopupMenu { id: copyImageAction text: qsTr("Copy image") onTriggered: { - chatsModel.copyImageToClipboard(imageSource ? imageSource : "") - messageContextMenu.close() + root.store.chatsModelInst.copyImageToClipboard(imageSource ? imageSource : "") + root.close() } icon.name: "copy" enabled: isRightClickOnImage @@ -223,7 +224,7 @@ StatusPopupMenu { text: qsTr("Download image") onTriggered: { fileDialog.open() - messageContextMenu.close() + root.close() } icon.name: "download" enabled: isRightClickOnImage @@ -235,7 +236,7 @@ StatusPopupMenu { text: qsTrId("view-profile") onTriggered: { openProfilePopup(userName, fromAuthor, identicon, "", nickname); - messageContextMenu.close() + root.close() } icon.name: "profile" enabled: isProfile @@ -243,19 +244,19 @@ StatusPopupMenu { StatusMenuItem { id: sendMessageOrReplyTo - text: messageContextMenu.isProfile ? + text: root.isProfile ? //% "Send message" qsTrId("send-message") : //% "Reply to" qsTrId("reply-to") onTriggered: { - if (messageContextMenu.isProfile) { + if (root.isProfile) { appMain.changeAppSection(Constants.chat) - chatsModel.channelView.joinPrivateChat(fromAuthor, "") + root.store.chatsModelInst.channelView.joinPrivateChat(fromAuthor, "") } else { showReplyArea() } - messageContextMenu.close() + root.close() } icon.name: "chat" enabled: isProfile || (!hideEmojiPicker && !emojiOnly && !isProfile && !isRightClickOnImage) @@ -285,7 +286,7 @@ StatusPopupMenu { } onTriggered: { if (pinnedMessage) { - chatsModel.messageView.unPinMessage(messageId, chatsModel.channelView.activeChannel.id) + root.store.chatsModelInst.messageView.unPinMessage(messageId, root.store.chatsModelInst.channelView.activeChannel.id) return } @@ -295,20 +296,20 @@ StatusPopupMenu { return } - chatsModel.messageView.pinMessage(messageId, chatsModel.channelView.activeChannel.id) - messageContextMenu.close() + root.store.chatsModelInst.messageView.pinMessage(messageId, root.store.chatsModelInst.channelView.activeChannel.id) + root.close() } icon.name: "pin" enabled: { if(isProfile || emojiOnly || isRightClickOnImage) return false - switch (chatsModel.channelView.activeChannel.chatType) { + switch (root.store.chatsModelInst.channelView.activeChannel.chatType) { case Constants.chatTypePublic: return false case Constants.chatTypeStatusUpdate: return false case Constants.chatTypeOneToOne: return true - case Constants.chatTypePrivateGroupChat: return chatsModel.channelView.activeChannel.isAdmin(profileModel.profile.pubKey) - case Constants.chatTypeCommunity: return chatsModel.communities.activeCommunity.admin + case Constants.chatTypePrivateGroupChat: return root.store.chatsModelInst.channelView.activeChannel.isAdmin(root.store.profileModelInst.profile.pubKey) + case Constants.chatTypeCommunity: return root.store.chatsModelInst.communities.activeCommunity.admin } return false @@ -332,7 +333,7 @@ StatusPopupMenu { text: qsTrId("delete-message") onTriggered: { if (!appSettings.showDeleteMessageWarning) { - return chatsModel.messageView.deleteMessage(messageId) + return root.store.chatsModelInst.messageView.deleteMessage(messageId) } let confirmationDialog = openPopup(genericConfirmationDialog, { @@ -348,7 +349,7 @@ StatusPopupMenu { } confirmationDialog.close() - chatsModel.messageView.deleteMessage(messageId) + root.store.chatsModelInst.messageView.deleteMessage(messageId) } }) } @@ -357,12 +358,12 @@ StatusPopupMenu { } StatusMenuItem { - enabled: messageContextMenu.pinnedPopup + enabled: root.pinnedPopup text: qsTr("Jump to") onTriggered: { - positionAtMessage(messageContextMenu.messageId) - messageContextMenu.close() - messageContextMenu.shouldCloseParentPopup() + positionAtMessage(root.messageId) + root.close() + root.shouldCloseParentPopup() } icon.name: "up" } @@ -373,7 +374,7 @@ StatusPopupMenu { selectFolder: true modality: Qt.NonModal onAccepted: { - chatsModel.downloadImage(imageSource ? imageSource : "", fileDialog.fileUrls) + root.store.chatsModelInst.downloadImage(imageSource ? imageSource : "", fileDialog.fileUrls) fileDialog.close() } onRejected: { diff --git a/ui/app/AppLayouts/Chat/views/MessageView.qml b/ui/app/AppLayouts/Chat/views/MessageView.qml index 63eba3e6af..fb1d423e55 100644 --- a/ui/app/AppLayouts/Chat/views/MessageView.qml +++ b/ui/app/AppLayouts/Chat/views/MessageView.qml @@ -11,11 +11,10 @@ import "../panels" import "../views" import "../controls" -Item { +Column { id: root width: parent.width anchors.right: !isCurrentUser ? undefined : parent.right - height: visible ? childrenRect.height : 0 z: (typeof chatLogView === "undefined") ? 1 : (chatLogView.count - index) ////////////////////////////////////// @@ -249,123 +248,27 @@ Item { } } - Timer { - id: timer - } - Component { id: gapComponent - Item { - id: wrapper - height: childrenRect.height + Style.current.smallPadding * 2 - anchors.left: parent.left - anchors.right: parent.right - Separator { - id: sep1 - } - StyledText { - id: fetchMoreButton - font.weight: Font.Medium - font.pixelSize: Style.current.primaryTextFontSize - color: Style.current.blue - //% "↓ " - //% "Fetch messages" - text: qsTrId("fetch-messages") - horizontalAlignment: Text.AlignHCenter - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: sep1.bottom - anchors.topMargin: Style.current.smallPadding - MouseArea { - cursorShape: Qt.PointingHandCursor - anchors.fill: parent - onClicked: { - chatsModel.messageView.fillGaps(messageId) - root.visible = false; - root.height = 0; - } - } - } - StyledText { - id: fetchDate - anchors.top: fetchMoreButton.bottom - anchors.topMargin: 3 - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - color: Style.current.secondaryText - //% "before %1" - //% "Between %1 and %2" - text: qsTrId("between--1-and--2").arg(new Date(root.gapFrom*1000)).arg(new Date(root.gapTo*1000)) - } - Separator { - anchors.top: fetchDate.bottom - anchors.topMargin: Style.current.smallPadding + GapComponent { + onClicked: { + rootStore.chatsModelInst.messageView.fillGaps(messageStore.messageId); + root.visible = false; + root.height = 0; } } } Component { id: fetchMoreMessagesButtonComponent - Item { - id: wrapper - height: childrenRect.height + Style.current.smallPadding * 2 - anchors.left: parent.left - anchors.right: parent.right - Separator { - id: sep1 + FetchMoreMessagesButton { +// nextMessageIndex: root.messageStore.nextMessageIndex +// nextMsgTimestamp: root.messageStore.nextMsgTimestamp + onClicked: { + rootStore.chatsModelInst.messageView.hideLoadingIndicator(); } - Loader { - id: fetchLoaderIndicator - anchors.top: sep1.bottom - anchors.topMargin: Style.current.padding - anchors.left: parent.left - anchors.right: parent.right - active: false - sourceComponent: StatusLoadingIndicator { - width: 12 - height: 12 - } - } - StyledText { - id: fetchMoreButton - font.weight: Font.Medium - font.pixelSize: Style.current.primaryTextFontSize - color: Style.current.blue - //% "↓ Fetch more messages" - text: qsTrId("load-more-messages") - horizontalAlignment: Text.AlignHCenter - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: sep1.bottom - anchors.topMargin: Style.current.smallPadding - MouseArea { - cursorShape: Qt.PointingHandCursor - anchors.fill: parent - onClicked: { - chatsModel.requestMoreMessages(Constants.fetchRangeLast24Hours); - fetchLoaderIndicator.active = true; - fetchMoreButton.visible = false; - fetchDate.visible = false; - timer.setTimeout(function(){ - chatsModel.messageView.hideLoadingIndicator(); - fetchLoaderIndicator.active = false; - fetchMoreButton.visible = true; - fetchDate.visible = true; - }, 3000); - } - } - } - StyledText { - id: fetchDate - anchors.top: fetchMoreButton.bottom - anchors.topMargin: 3 - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - color: Style.current.secondaryText - //% "before %1" - text: qsTrId("before--1").arg((nextMessageIndex > -1 ? new Date(nextMsgTimestamp * 1) : new Date()).toLocaleString(Qt.locale(globalSettings.locale))) - } - Separator { - anchors.top: fetchDate.bottom - anchors.topMargin: Style.current.smallPadding + onTimerTriggered: { + rootStore.chatsModelInst.requestMoreMessages(Constants.fetchRangeLast24Hours); } } } diff --git a/ui/app/AppLayouts/Chat/views/NormalMessageView.qml b/ui/app/AppLayouts/Chat/views/NormalMessageView.qml index 95d405a894..44f2a3786d 100644 --- a/ui/app/AppLayouts/Chat/views/NormalMessageView.qml +++ b/ui/app/AppLayouts/Chat/views/NormalMessageView.qml @@ -289,6 +289,7 @@ Item { anchors.rightMargin: Style.current.padding sourceComponent: Component { TransactionBubblePanel { + balanceView: root.store.walletModelInst.balanceView focusedAccount: root.store.walletModelInst.accountsView.focusedAccount activeChannelName: root.store.chatsModelInst.channelView.activeChannel.name activeChannelIdenticon: root.store.chatsModelInst.channelView.activeChannel.identicon @@ -324,7 +325,7 @@ Item { anchors.verticalCenter: isImage ? dateTimeBackground.verticalCenter : undefined anchors.right: isImage ? dateTimeBackground.right : (linksLoader.active ? linksLoader.right : chatBox.right) anchors.rightMargin: isImage ? 6 : (root.isCurrentUser ? 5 : Style.current.padding) - timestamp: root.messageStore.timestamp + //timestamp: root.messageStore.timestamp } SentMessage { diff --git a/ui/app/AppLayouts/Profile/views/EnsListView.qml b/ui/app/AppLayouts/Profile/views/EnsListView.qml index 19e2c53d67..8bbad00c72 100644 --- a/ui/app/AppLayouts/Profile/views/EnsListView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsListView.qml @@ -338,7 +338,7 @@ Item { anchors.bottomMargin: Style.current.padding anchors.right: chatBox.right anchors.rightMargin: Style.current.padding - timestamp: root.timestamp + //timestamp: root.timestamp } StatusBaseText { @@ -350,8 +350,6 @@ Item { font.pixelSize: 14 color: Theme.palette.baseColor1 } - - } diff --git a/ui/app/AppLayouts/Timeline/TimelineLayout.qml b/ui/app/AppLayouts/Timeline/TimelineLayout.qml index f25c298fac..75a5bc2914 100644 --- a/ui/app/AppLayouts/Timeline/TimelineLayout.qml +++ b/ui/app/AppLayouts/Timeline/TimelineLayout.qml @@ -10,7 +10,6 @@ import "../../../shared/controls" import "../../../shared/status" import "../Chat/views" -import "../Chat/panels" import "../Chat/popups" import "../Chat/stores" @@ -214,8 +213,9 @@ ScrollView { messageStore.timeout = model.timeout; messageStore.messageContextMenu = msgCntxtMenu; } - MessageContextMenuPanel { + MessageContextMenuView { id: msgCntxtMenu + store: root.store reactionModel: EmojiReactions { } } } diff --git a/ui/shared/status/StatusStickersPopup.qml b/ui/shared/status/StatusStickersPopup.qml index dbca839d5e..e2aed84ebe 100644 --- a/ui/shared/status/StatusStickersPopup.qml +++ b/ui/shared/status/StatusStickersPopup.qml @@ -185,7 +185,7 @@ Popup { id: btnAddStickerPack implicitWidth: 24 implicitHeight: 24 - type: StatusRoundButton.Type.Secondary + type: StatusQControls.StatusRoundButton.Type.Secondary icon.name: "add" state: root.stickerPacksLoaded ? "default" : "pending" onClicked: {