Move the ActionsHandler instance to the RoomPage
This is required since when using a RoomWindow, the ActionsHandler from the RoomManager is used, which means that the wrong room is used.
This commit is contained in:
@@ -30,6 +30,14 @@ Kirigami.ScrollablePage {
|
||||
|
||||
onCurrentRoomChanged: ChatBoxHelper.clearEditReply()
|
||||
|
||||
|
||||
ActionsHandler {
|
||||
id: actionsHandler
|
||||
room: page.currentRoom
|
||||
connection: Controller.activeConnection
|
||||
}
|
||||
|
||||
|
||||
Connections {
|
||||
target: Controller.activeConnection
|
||||
function onJoinedRoom(room) {
|
||||
@@ -40,7 +48,7 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: roomManager.actionsHandler
|
||||
target: actionsHandler
|
||||
onShowMessage: {
|
||||
page.header.contentItem.text = message;
|
||||
page.header.contentItem.type = messageType === ActionsHandler.Error ? Kirigami.MessageType.Error : Kirigami.MessageType.Information;
|
||||
|
||||
Reference in New Issue
Block a user