Add the inviter to JoinRoomScreen when it's an invite. (#3093)

* Add inviter property to RoomProxyProtocol.

* Extract the room cell inviter label into it's own view.

* Use the new RoomInviterLabel in the JoinRoomScreen.

* Fix bug with invite to a public room.
This commit is contained in:
Doug
2024-07-29 09:57:49 +01:00
committed by GitHub
parent 9518e8a219
commit 0fab3a8afc
16 changed files with 156 additions and 53 deletions
@@ -8273,6 +8273,23 @@ class RoomProxyMock: RoomProxyProtocol {
set(value) { underlyingMembership = value }
}
var underlyingMembership: Membership!
var inviterCallsCount = 0
var inviterCalled: Bool {
return inviterCallsCount > 0
}
var inviter: RoomMemberProxyProtocol? {
get async {
inviterCallsCount += 1
if let inviterClosure = inviterClosure {
return await inviterClosure()
} else {
return underlyingInviter
}
}
}
var underlyingInviter: RoomMemberProxyProtocol?
var inviterClosure: (() async -> RoomMemberProxyProtocol?)?
var hasOngoingCall: Bool {
get { return underlyingHasOngoingCall }
set(value) { underlyingHasOngoingCall = value }