Make offline presence to stop sync

Setting the presence of an account to offline
will make the client to end sync task and will
prevent messages from being sent.

Setting it to online again or any other presence
will start sync task again.

Left:
- Local echo to presence change
- UI Control to affect all members presence
- Block more requests to be sent (e.g. member
  actions)
This commit is contained in:
vslg
2020-07-09 17:06:14 -03:00
committed by miruka
parent 3fa35b88c9
commit a3c9ac20c6
12 changed files with 231 additions and 109 deletions

View File

@@ -57,6 +57,10 @@ MultiviewPane {
}
readonly property QtObject accountModel:
ModelStore.get("accounts").find(chat.roomInfo.for_account)
function toggleFocus() {
if (roomPane.activeFocus) {
if (roomPane.collapse) roomPane.close()
@@ -78,7 +82,9 @@ MultiviewPane {
}
MemberView {}
SettingsView {}
SettingsView {
enabled: accountModel.presence !== "offline"
}
HShortcut {
sequences: window.settings.keys.toggleFocusRoomPane