Cleanup connection handling in QML

Consistently pass connection objects to files that need them instead of randomly using Controller.activeConnection in some of them
This commit is contained in:
Tobias Fella
2023-09-12 17:10:16 +02:00
committed by Carl Schwan
parent 6439fa48f9
commit 5e80715898
37 changed files with 203 additions and 72 deletions

View File

@@ -17,6 +17,7 @@ FormCard.FormCardPage {
id: root
property NeoChatRoom room
required property NeoChatConnection connection
title: i18n("General")
@@ -287,7 +288,7 @@ FormCard.FormCardPage {
actions: Kirigami.Action {
text: i18n("See older messages…")
onTriggered: {
RoomManager.enterRoom(Controller.activeConnection.room(room.predecessorId));
RoomManager.enterRoom(root.connection.room(room.predecessorId));
root.close();
}
}
@@ -301,7 +302,7 @@ FormCard.FormCardPage {
actions: Kirigami.Action {
text: i18n("See new room…")
onTriggered: {
RoomManager.enterRoom(Controller.activeConnection.room(room.successorId));
RoomManager.enterRoom(root.connection.room(room.successorId));
root.close();
}
}