Make clientManager easier to use
- Backend.clientManager renamed to Backend.clients - clientManager is now a Mapping subclass Before/After from Python: backend.clientManager.clients[thing] → backend.clients[thing] From QML: Backend.clientManager.clients[thing] → Backend.clients.get(thing)
This commit is contained in:
@@ -30,16 +30,12 @@ Banner {
|
||||
buttonCallbacks: {
|
||||
"accept": function(button) {
|
||||
button.loading = true
|
||||
Backend.clientManager.clients[chatPage.userId].joinRoom(
|
||||
chatPage.roomId
|
||||
)
|
||||
Backend.clients.get(chatPage.userId).joinRoom(chatPage.roomId)
|
||||
},
|
||||
|
||||
"decline": function(button) {
|
||||
button.loading = true
|
||||
Backend.clientManager.clients[chatPage.userId].leaveRoom(
|
||||
chatPage.roomId
|
||||
)
|
||||
Backend.clients.get(chatPage.userId).leaveRoom(chatPage.roomId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -22,9 +22,7 @@ Banner {
|
||||
"forget": function(button) {
|
||||
button.loading = true
|
||||
chatPage.canLoadPastEvents = false
|
||||
Backend.clientManager.clients[chatPage.userId].forgetRoom(
|
||||
chatPage.roomId
|
||||
)
|
||||
Backend.clients.get(chatPage.userId).forgetRoom(chatPage.roomId)
|
||||
pageStack.clear()
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user