Merge pull request #411 from monich/hide-drawer

Handle more cases when the drawer should be closed
This commit is contained in:
Sebastian Wolf 2021-04-05 11:02:41 +02:00 committed by GitHub
commit 23d4ac6c02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -55,6 +55,9 @@ ListItem {
if(messageListItem.precalculatedValues.pageIsSelecting) { if(messageListItem.precalculatedValues.pageIsSelecting) {
page.toggleMessageSelection(myMessage); page.toggleMessageSelection(myMessage);
} else { } else {
if (messageOptionsDrawer.sourceItem !== messageListItem) {
messageOptionsDrawer.open = false
}
// Allow extra context to react to click // Allow extra context to react to click
var extraContent = extraContentLoader.item var extraContent = extraContentLoader.item
if (extraContent && extraContentLoader.contains(mapToItem(extraContentLoader, mouse.x, mouse.y))) { if (extraContent && extraContentLoader.contains(mapToItem(extraContentLoader, mouse.x, mouse.y))) {
@ -70,6 +73,7 @@ ListItem {
page.selectedMessages = []; page.selectedMessages = [];
page.state = "" page.state = ""
} else { } else {
messageOptionsDrawer.open = false
contextMenuLoader.active = true; contextMenuLoader.active = true;
} }
} }

View file

@ -449,7 +449,9 @@ Page {
} }
} }
} }
break;
case PageStatus.Deactivating:
messageOptionsDrawer.open = false
break; break;
case PageStatus.Active: case PageStatus.Active:
if (!chatPage.isInitialized) { if (!chatPage.isInitialized) {