From e5b67c722ea23f3b79fbbfcaa78349cf58a084fe Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 10 Jul 2020 12:41:20 -0400 Subject: [PATCH] Disable inviting members while offline --- TODO.md | 1 + src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 023364ec..37352ace 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,6 @@ # TODO +- presence keybinds - retry if media not found - fix members not synced bug - fix local unread counters order diff --git a/src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml b/src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml index 694e6b3c..2cb88bc2 100644 --- a/src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml +++ b/src/gui/Pages/Chat/RoomPane/MemberView/MemberView.qml @@ -120,7 +120,9 @@ HColumnLayout { icon.name: "room-send-invite" backgroundColor: theme.chat.roomPane.bottomBar.inviteButton.background - enabled: chat.roomInfo.can_invite + enabled: + chat.userInfo.presence !== "offline" && + chat.roomInfo.can_invite toolTip.text: enabled ? @@ -142,7 +144,8 @@ HColumnLayout { HShortcut { sequences: window.settings.keys.inviteToRoom - onActivated: inviteButton.clicked() + onActivated: + if (inviteButton.enabled) inviteButton.clicked() } } }