Presence fixes and improvements

- Allow using invisible mode on servers not supporting presence, to
  make use of the prevention of sending typing notifications and read
  marker updates

- For servers not supporting presence, display the account's presence
  orb in the left pane with half opacity

- Indicate in the presence orb tooltip when the presence we set hasn't
  yet been noticed by the server/the server doesn't support presence

- When reconnecting after being offline, if the server doesn't indicate
  we have a status message [set from another client], restore any
  previous message we had set in the current client

- Show our status message striked out when we're invisible or offline to
  indicate that it isn't being broadcasted

- Some code style cleanups

- Try to handle cases where we set a presence, but receive a new
  presence event for our account before the server takes notice of that
  new presence we want, which probably resulted in the "account keeps
  switching between online and unavailable every few sec" glitch
This commit is contained in:
miruka
2021-04-15 11:05:15 -04:00
parent 909756cff7
commit 18f742966e
7 changed files with 95 additions and 90 deletions

View File

@@ -35,10 +35,11 @@ Rectangle {
HToolTip {
visible: presenceHover.hovered
text:
text: qsTr("%1 (%2)").arg(
presence.includes("online") ? qsTr("Online") :
presence.includes("unavailable") ? qsTr("Unavailable") :
presence.includes("invisible") ? qsTr("Invisible") :
qsTr("Offline")
).arg("unknown to server")
}
}