Make sure the function createRoomListContextMenu doesn't make the roomlist settings button visible on mobile

This commit is contained in:
James Graham
2022-12-14 18:22:42 +00:00
parent f475965cf7
commit eb5523a69c

View File

@@ -376,11 +376,13 @@ Kirigami.ScrollablePage {
function createRoomListContextMenu() {
const menu = roomListContextMenu.createObject(page, {room: currentRoom})
configButton.visible = true
configButton.down = true
if (!Kirigami.Settings.isMobile) {
configButton.visible = true
configButton.down = true
}
menu.closed.connect(function() {
configButton.down = undefined
configButton.visible = Qt.binding(function() { return roomListItem.hovered || Kirigami.Settings.isMobile })
configButton.visible = Qt.binding(function() { return roomListItem.hovered && !Kirigami.Settings.isMobile })
})
menu.open()
}