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() { function createRoomListContextMenu() {
const menu = roomListContextMenu.createObject(page, {room: currentRoom}) const menu = roomListContextMenu.createObject(page, {room: currentRoom})
configButton.visible = true if (!Kirigami.Settings.isMobile) {
configButton.down = true configButton.visible = true
configButton.down = true
}
menu.closed.connect(function() { menu.closed.connect(function() {
configButton.down = undefined 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() menu.open()
} }