From d26f087df9720b5aa7c25fee4225da0590467c0c Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 7 Jul 2019 22:49:28 -0400 Subject: [PATCH] More checks to avoid errors on forgetting room --- TODO.md | 2 -- src/qml/Chat/Banners/InviteBanner.qml | 2 +- src/qml/Chat/Banners/LeftBanner.qml | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 19350ee5..5f1a65ab 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,3 @@ -- room doesn't change category when accept/reject invite - - "rejoin" leftbanner button if room is public - daybreak color - html links color diff --git a/src/qml/Chat/Banners/InviteBanner.qml b/src/qml/Chat/Banners/InviteBanner.qml index e38b13dc..dbb4d069 100644 --- a/src/qml/Chat/Banners/InviteBanner.qml +++ b/src/qml/Chat/Banners/InviteBanner.qml @@ -13,7 +13,7 @@ Banner { avatar.userId: inviterId labelText: qsTr("%1 invited you to join the room.").arg( - inviterId ? + inviterId && inviterInfo ? Utils.coloredNameHtml(inviterInfo.displayName, inviterId) : qsTr("Someone") ) diff --git a/src/qml/Chat/Banners/LeftBanner.qml b/src/qml/Chat/Banners/LeftBanner.qml index 6aa2858a..d0303e19 100644 --- a/src/qml/Chat/Banners/LeftBanner.qml +++ b/src/qml/Chat/Banners/LeftBanner.qml @@ -9,7 +9,7 @@ Banner { // TODO: avatar func auto avatar.userId: userId - avatar.imageUrl: users.find(userId).avatarUrl + avatar.imageUrl: userInfo ? userInfo.avatarUrl : null labelText: qsTr("You are not part of this room anymore.") buttonModel: [