Fix highlighted behavior after options drawer was opened

This commit is contained in:
Sebastian Wolf 2021-02-16 21:36:29 +01:00
parent e2e78713df
commit 7ae58badd9
No known key found for this signature in database
GPG key ID: CEA9522B5F38A90A
3 changed files with 6 additions and 5 deletions

View file

@ -43,8 +43,9 @@ ListItem {
}); });
readonly property bool isOwnMessage: page.myUserId === myMessage.sender.user_id readonly property bool isOwnMessage: page.myUserId === myMessage.sender.user_id
property bool hasContentComponent property bool hasContentComponent
property bool additionalOptionsOpened
highlighted: (down || isSelected) && !menuOpen highlighted: (down || isSelected || additionalOptionsOpened) && !menuOpen
openMenuOnPressAndHold: !messageListItem.precalculatedValues.pageIsSelecting openMenuOnPressAndHold: !messageListItem.precalculatedValues.pageIsSelecting
signal replyToMessage() signal replyToMessage()
@ -81,7 +82,7 @@ ListItem {
Connections { Connections {
target: messageOptionsDrawer target: messageOptionsDrawer
onCloseRequested: { onCloseRequested: {
messageListItem.highlighted = false; messageListItem.additionalOptionsOpened = false;
} }
} }
@ -119,7 +120,7 @@ ListItem {
messageOptionsDrawer.userInformation = userInformation; messageOptionsDrawer.userInformation = userInformation;
messageOptionsDrawer.sourceItem = messageListItem messageOptionsDrawer.sourceItem = messageListItem
messageOptionsDrawer.additionalItemsModel = (extraContentLoader.item && ("extraContextMenuItems" in extraContentLoader.item)) ? extraContentLoader.item.extraContextMenuItems : 0; messageOptionsDrawer.additionalItemsModel = (extraContentLoader.item && ("extraContextMenuItems" in extraContentLoader.item)) ? extraContentLoader.item.extraContextMenuItems : 0;
messageListItem.highlighted = true; messageListItem.additionalOptionsOpened = true;
messageOptionsDrawer.open = true; messageOptionsDrawer.open = true;
} }
text: qsTr("More Options...") text: qsTr("More Options...")

View file

@ -12,7 +12,7 @@ Name: harbour-fernschreiber
Summary: Fernschreiber is a Telegram client for Sailfish OS Summary: Fernschreiber is a Telegram client for Sailfish OS
Version: 0.7.1 Version: 0.7.1
Release: 4 Release: 5
Group: Qt/Qt Group: Qt/Qt
License: LICENSE License: LICENSE
URL: http://werkwolf.eu/ URL: http://werkwolf.eu/

View file

@ -1,7 +1,7 @@
Name: harbour-fernschreiber Name: harbour-fernschreiber
Summary: Fernschreiber is a Telegram client for Sailfish OS Summary: Fernschreiber is a Telegram client for Sailfish OS
Version: 0.7.1 Version: 0.7.1
Release: 4 Release: 5
# The contents of the Group field should be one of the groups listed here: # The contents of the Group field should be one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS # https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
Group: Qt/Qt Group: Qt/Qt