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:
Carl Schwan
2020-11-16 10:00:18 +01:00
parent 523adace21
commit 6db8354727
7 changed files with 57 additions and 75 deletions

View File

@@ -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)
}
}
}