fix(@desktop/chat): chat content overlapping with Start Chat dialog

This commit is contained in:
Michał Cieślak 2022-07-22 13:24:28 +02:00 committed by Michał
parent f746b2c279
commit 2847849de7
6 changed files with 22 additions and 22 deletions

@ -1 +1 @@
Subproject commit 08f8cd60c46845a601f5338da476241adaac9cef Subproject commit 9de0e8ffc5a7394a6bcf2f8d2e3ad21afa70b97f

View File

@ -42,7 +42,8 @@ StatusAppThreePanelLayout {
Connections { Connections {
target: root.rootStore.stickersStore.stickersModule target: root.rootStore.stickersStore.stickersModule
onStickerPacksLoaded: {
function onStickerPacksLoaded() {
root.stickersLoaded = true; root.stickersLoaded = true;
} }
} }
@ -50,15 +51,9 @@ StatusAppThreePanelLayout {
Connections { Connections {
target: root.rootStore.chatCommunitySectionModule target: root.rootStore.chatCommunitySectionModule
ignoreUnknownSignals: true ignoreUnknownSignals: true
onActiveItemChanged: {
root.rootStore.openCreateChat = false;
}
}
Connections { function onActiveItemChanged() {
target: Global Global.closeCreateChatView()
onCloseCreateChatView: {
root.rootStore.openCreateChat = false
} }
} }

View File

@ -64,8 +64,7 @@ Item {
checked: root.store.openCreateChat checked: root.store.openCreateChat
highlighted: root.store.openCreateChat highlighted: root.store.openCreateChat
onClicked: { onClicked: {
root.store.openCreateChat = !root.store.openCreateChat; if (root.store.openCreateChat) {
if (!root.store.openCreateChat) {
Global.closeCreateChatView() Global.closeCreateChatView()
} else { } else {
Global.openCreateChatView() Global.openCreateChatView()
@ -163,7 +162,11 @@ Item {
draggableCategories: communityData.amISectionAdmin draggableCategories: communityData.amISectionAdmin
model: root.communitySectionModule.model model: root.communitySectionModule.model
highlightItem: !root.store.openCreateChat
onChatItemSelected: { onChatItemSelected: {
Global.closeCreateChatView()
if(categoryId === "") if(categoryId === "")
root.communitySectionModule.setActiveItem(id, "") root.communitySectionModule.setActiveItem(id, "")
else else

View File

@ -86,11 +86,10 @@ Item {
checked: root.store.openCreateChat checked: root.store.openCreateChat
highlighted: checked highlighted: checked
onClicked: { onClicked: {
root.store.openCreateChat = !root.store.openCreateChat
if (root.store.openCreateChat) { if (root.store.openCreateChat) {
Global.openCreateChatView()
} else {
Global.closeCreateChatView() Global.closeCreateChatView()
} else {
Global.openCreateChatView()
} }
} }

View File

@ -20,10 +20,7 @@ Page {
property var rootStore property var rootStore
property var emojiPopup: null property var emojiPopup: null
Keys.onEscapePressed: { Keys.onEscapePressed: Global.closeCreateChatView()
Global.closeCreateChatView()
root.rootStore.openCreateChat = false;
}
StatusListView { StatusListView {
id: contactsModelListView id: contactsModelListView

View File

@ -513,6 +513,7 @@ Item {
contactsStore: appMain.rootStore.contactStore contactsStore: appMain.rootStore.contactStore
rootStore.emojiReactionsModel: appMain.rootStore.emojiReactionsModel rootStore.emojiReactionsModel: appMain.rootStore.emojiReactionsModel
rootStore.openCreateChat: createChatView.opened
chatView.onProfileButtonClicked: { chatView.onProfileButtonClicked: {
Global.changeAppSectionBySectionType(Constants.appSection.profile); Global.changeAppSectionBySectionType(Constants.appSection.profile);
@ -617,6 +618,7 @@ Item {
contactsStore: appMain.rootStore.contactStore contactsStore: appMain.rootStore.contactStore
rootStore.emojiReactionsModel: appMain.rootStore.emojiReactionsModel rootStore.emojiReactionsModel: appMain.rootStore.emojiReactionsModel
rootStore.openCreateChat: createChatView.opened
chatView.onProfileButtonClicked: { chatView.onProfileButtonClicked: {
Global.changeAppSectionBySectionType(Constants.appSection.profile); Global.changeAppSectionBySectionType(Constants.appSection.profile);
@ -639,9 +641,10 @@ Item {
} }
CreateChatView { CreateChatView {
id: createChatView
property bool opened: false property bool opened: false
id: createChatView
rootStore: chatLayoutContainer.rootStore rootStore: chatLayoutContainer.rootStore
emojiPopup: statusEmojiPopup emojiPopup: statusEmojiPopup
anchors.top: parent.top anchors.top: parent.top
@ -654,13 +657,16 @@ Item {
Connections { Connections {
target: Global target: Global
onOpenCreateChatView: {
function onOpenCreateChatView() {
createChatView.opened = true createChatView.opened = true
} }
onCloseCreateChatView: {
function onCloseCreateChatView() {
createChatView.opened = false createChatView.opened = false
} }
} }
Connections { Connections {
target: mainModule target: mainModule
onActiveSectionChanged: { onActiveSectionChanged: {