Bug fix and minor improvements

Improvements:
- Add instant feedback upon setting a different
  presence for account (local echo)
- Sort room members by power level and then
  presence
- Periodically update members' `last_acitve_at`
  field on the room pane
- Move status message field up on account context
  menu, and put invisible before offline again

Bug fix:
- Do not try to override presence set from
  another client, accept it
This commit is contained in:
vslg
2020-07-09 20:53:25 -03:00
committed by miruka
parent a3c9ac20c6
commit 43df8fd60b
6 changed files with 94 additions and 60 deletions

View File

@@ -44,11 +44,25 @@ HTile {
TitleRightInfoLabel {
tile: member
text:
model.presence !== "online" &&
model.last_active_ago !== -1 ?
utils.formatRelativeTime(model.last_active_ago) :
""
visible: presenceTimer.running
Timer {
id: presenceTimer
running:
! model.currently_active &&
model.last_active_at > new Date(1)
repeat: true
interval:
new Date() - model.last_active_at < 60000 ?
10000 :
60000
triggeredOnStart: true
onTriggered: parent.text = Qt.binding(() =>
utils.formatRelativeTime(
new Date() - model.last_active_at
)
)
}
}
}