Improve Invitation Flow

- Update the conatainsUser function to use memberState so that invites do not show up as being in the leave state.
- Update the InviteUser page to use Kirigami.BasicListItem and make the invite button remain visible but be untoggleable when the if user has already been invited.

closes network/neochat#202
This commit is contained in:
James Graham
2023-04-29 17:13:24 +00:00
committed by Tobias Fella
parent d844945453
commit e8166f3433
2 changed files with 28 additions and 49 deletions

View File

@@ -920,6 +920,9 @@ void NeoChatRoom::toggleReaction(const QString &eventId, const QString &reaction
bool NeoChatRoom::containsUser(const QString &userID) const
{
#ifdef QUOTIENT_07
return memberState(userID) != Membership::Leave;
#else
auto u = Room::user(userID);
if (!u) {
@@ -927,6 +930,7 @@ bool NeoChatRoom::containsUser(const QString &userID) const
}
return Room::memberJoinState(u) != JoinState::Leave;
#endif
}
bool NeoChatRoom::canSendEvent(const QString &eventType) const