Make EditAccount show a spinner until ready

Instead of crashing if userInfo is not yet available.

statusMessage is removed for now from UserUpdated events,
and the users model items will have a "loading" property.
This commit is contained in:
miruka
2019-07-21 07:14:16 -04:00
parent 71f78feec6
commit 853bb350b4
13 changed files with 53 additions and 62 deletions

View File

@@ -11,8 +11,8 @@ function onAccountDeleted(userId) {
accounts.popWhere({userId}, 1)
}
function onUserUpdated(userId, displayName, avatarUrl, statusMessage) {
users.upsert({userId}, {userId, displayName, avatarUrl, statusMessage})
function onUserUpdated(userId, displayName, avatarUrl) {
users.upsert({userId}, {userId, displayName, avatarUrl, loading: false})
}
function onDeviceUpdated(userId, deviceId, ed25519Key, trust, displayName,