diff --git a/ui/StatusQ b/ui/StatusQ index 08f8cd60c4..9de0e8ffc5 160000 --- a/ui/StatusQ +++ b/ui/StatusQ @@ -1 +1 @@ -Subproject commit 08f8cd60c46845a601f5338da476241adaac9cef +Subproject commit 9de0e8ffc5a7394a6bcf2f8d2e3ad21afa70b97f diff --git a/ui/app/AppLayouts/Chat/views/ChatView.qml b/ui/app/AppLayouts/Chat/views/ChatView.qml index 5dbc239a0a..11264be72d 100644 --- a/ui/app/AppLayouts/Chat/views/ChatView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatView.qml @@ -42,7 +42,8 @@ StatusAppThreePanelLayout { Connections { target: root.rootStore.stickersStore.stickersModule - onStickerPacksLoaded: { + + function onStickerPacksLoaded() { root.stickersLoaded = true; } } @@ -50,15 +51,9 @@ StatusAppThreePanelLayout { Connections { target: root.rootStore.chatCommunitySectionModule ignoreUnknownSignals: true - onActiveItemChanged: { - root.rootStore.openCreateChat = false; - } - } - Connections { - target: Global - onCloseCreateChatView: { - root.rootStore.openCreateChat = false + function onActiveItemChanged() { + Global.closeCreateChatView() } } diff --git a/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml b/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml index eef5e8c58a..9aa3416939 100644 --- a/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml @@ -64,8 +64,7 @@ Item { checked: root.store.openCreateChat highlighted: root.store.openCreateChat onClicked: { - root.store.openCreateChat = !root.store.openCreateChat; - if (!root.store.openCreateChat) { + if (root.store.openCreateChat) { Global.closeCreateChatView() } else { Global.openCreateChatView() @@ -163,7 +162,11 @@ Item { draggableCategories: communityData.amISectionAdmin model: root.communitySectionModule.model + highlightItem: !root.store.openCreateChat + onChatItemSelected: { + Global.closeCreateChatView() + if(categoryId === "") root.communitySectionModule.setActiveItem(id, "") else diff --git a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml index c90517f92d..d85dd5859e 100644 --- a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml @@ -86,11 +86,10 @@ Item { checked: root.store.openCreateChat highlighted: checked onClicked: { - root.store.openCreateChat = !root.store.openCreateChat if (root.store.openCreateChat) { - Global.openCreateChatView() - } else { Global.closeCreateChatView() + } else { + Global.openCreateChatView() } } diff --git a/ui/app/AppLayouts/Chat/views/CreateChatView.qml b/ui/app/AppLayouts/Chat/views/CreateChatView.qml index 70cd2ffd50..1f16363479 100644 --- a/ui/app/AppLayouts/Chat/views/CreateChatView.qml +++ b/ui/app/AppLayouts/Chat/views/CreateChatView.qml @@ -20,10 +20,7 @@ Page { property var rootStore property var emojiPopup: null - Keys.onEscapePressed: { - Global.closeCreateChatView() - root.rootStore.openCreateChat = false; - } + Keys.onEscapePressed: Global.closeCreateChatView() StatusListView { id: contactsModelListView diff --git a/ui/app/mainui/AppMain.qml b/ui/app/mainui/AppMain.qml index 06fe7248e8..e82fb601ee 100644 --- a/ui/app/mainui/AppMain.qml +++ b/ui/app/mainui/AppMain.qml @@ -513,6 +513,7 @@ Item { contactsStore: appMain.rootStore.contactStore rootStore.emojiReactionsModel: appMain.rootStore.emojiReactionsModel + rootStore.openCreateChat: createChatView.opened chatView.onProfileButtonClicked: { Global.changeAppSectionBySectionType(Constants.appSection.profile); @@ -617,6 +618,7 @@ Item { contactsStore: appMain.rootStore.contactStore rootStore.emojiReactionsModel: appMain.rootStore.emojiReactionsModel + rootStore.openCreateChat: createChatView.opened chatView.onProfileButtonClicked: { Global.changeAppSectionBySectionType(Constants.appSection.profile); @@ -639,9 +641,10 @@ Item { } CreateChatView { + id: createChatView + property bool opened: false - id: createChatView rootStore: chatLayoutContainer.rootStore emojiPopup: statusEmojiPopup anchors.top: parent.top @@ -654,13 +657,16 @@ Item { Connections { target: Global - onOpenCreateChatView: { + + function onOpenCreateChatView() { createChatView.opened = true } - onCloseCreateChatView: { + + function onCloseCreateChatView() { createChatView.opened = false } } + Connections { target: mainModule onActiveSectionChanged: {