From fbbfa30b1bded1a72e78df093271d8891390d278 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Wed, 5 May 2021 14:19:55 -0400 Subject: [PATCH] Allow image drag/drop in communities --- ui/app/AppLayouts/Chat/ChatColumn.qml | 2 ++ ui/app/AppMain.qml | 5 ++++- ui/main.qml | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn.qml b/ui/app/AppLayouts/Chat/ChatColumn.qml index a14e7676b7..cc590e341c 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn.qml @@ -32,6 +32,8 @@ StackLayout { property string activeChatId: chatsModel.activeChannel.id property bool isBlocked: profileModel.contacts.isContactBlocked(activeChatId) + + property var input: chatInput Component.onCompleted: { chatInput.textInput.forceActiveFocus(Qt.MouseFocusReason) diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index 5d67d7152c..bf505958ea 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -418,7 +418,10 @@ RowLayout { section: Constants.chat doNotHandleClick: true onClicked: { - chatsModel.communities.activeCommunity.active = false + if (chatsModel.communities.activeCommunity.active) { + chatLayoutContainer.chatColumn.input.hideExtendedArea(); + chatsModel.communities.activeCommunity.active = false + } appMain.changeAppSection(Constants.chat) } diff --git a/ui/main.qml b/ui/main.qml index c68a97ee45..a617212dbf 100644 --- a/ui/main.qml +++ b/ui/main.qml @@ -275,7 +275,9 @@ ApplicationWindow { ) ) || // in timeline view - loader.item.currentView === timelineView + loader.item.currentView === timelineView || + // In community section + chatsModel.communities.activeCommunity.active ) width: applicationWindow.width