Refactor and fix invitations
-Move invitation handling into RoomPage and delete InvitationPage -Open the new room after accepting the invitation
This commit is contained in:
@@ -75,6 +75,12 @@ NeoChatRoom::NeoChatRoom(Connection *connection, QString roomId, JoinState joinS
|
||||
connect(this, &Room::aboutToAddHistoricalMessages, this, &NeoChatRoom::readMarkerLoadedChanged);
|
||||
|
||||
connect(this, &Quotient::Room::eventsHistoryJobChanged, this, &NeoChatRoom::lastActiveTimeChanged);
|
||||
|
||||
connect(this, &Room::joinStateChanged, this, [=](JoinState oldState, JoinState newState) {
|
||||
if(oldState == JoinState::Invite && newState != JoinState::Invite) {
|
||||
Q_EMIT isInviteChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void NeoChatRoom::uploadFile(const QUrl &url, const QString &body)
|
||||
@@ -685,3 +691,8 @@ bool NeoChatRoom::readMarkerLoaded() const
|
||||
const auto it = findInTimeline(readMarkerEventId());
|
||||
return it != timelineEdge();
|
||||
}
|
||||
|
||||
bool NeoChatRoom::isInvite() const
|
||||
{
|
||||
return joinState() == JoinState::Invite;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user