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:
committed by
Carl Schwan
parent
6439fa48f9
commit
5e80715898
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user