Fix MessageDelegateContextMenu not being displayed
It turnout that using an QML Singleton was a bad idea, instead create a qml object in the main component and refer to it in the rest of the codebase. This commit also simplify a bit the qml structure of the Menu and fix some visual bugs.
This commit is contained in:
@@ -58,7 +58,7 @@ Kirigami.ScrollablePage {
|
||||
if (!identifierField.isJoined) {
|
||||
Controller.joinRoom(connection, identifierField.text);
|
||||
}
|
||||
RoomManager.enterRoom(connection.room(identifierField.room));
|
||||
roomManager.enterRoom(connection.room(identifierField.room));
|
||||
applicationWindow().pageStack.layers.pop();
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ Kirigami.ScrollablePage {
|
||||
Controller.joinRoom(connection, roomID)
|
||||
justJoined = true;
|
||||
} else {
|
||||
RoomManager.enterRoom(connection.room(roomID))
|
||||
roomManager.enterRoom(connection.room(roomID))
|
||||
applicationWindow().pageStack.layers.pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import org.kde.kirigami 2.13 as Kirigami
|
||||
import org.kde.kitemmodels 1.0
|
||||
import org.kde.neochat 1.0
|
||||
|
||||
import NeoChat 1.0
|
||||
import NeoChat.Component 1.0
|
||||
import NeoChat.Menu 1.0
|
||||
|
||||
@@ -135,7 +134,7 @@ Kirigami.ScrollablePage {
|
||||
if (mouse.button == Qt.RightButton) {
|
||||
roomListContextMenu.createObject(parent, {"room": currentRoom}).popup()
|
||||
} else {
|
||||
RoomManager.enterRoom(currentRoom)
|
||||
roomManager.enterRoom(currentRoom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user