mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Knock Requests banner display logic (#3550)
* added the join rule to the info * update SDK and added logic to display the banner in the room screen * added the logic to display the banner
This commit is contained in:
@@ -39,6 +39,18 @@ struct RoomScreenViewState: BindableState {
|
||||
var hasOngoingCall: Bool
|
||||
var shouldShowCallButton = true
|
||||
|
||||
var isKnockingEnabled = false
|
||||
var isKnockableRoom = false
|
||||
var canAcceptKnocks = false
|
||||
var canDeclineKnocks = false
|
||||
var canBan = false
|
||||
// TODO: We still don't know how to get these, but these will be the non already seen knock requests of the room, for now we are using this as a mock for testing purposes
|
||||
var unseenKnockRequests: [KnockRequestInfo] = [.init(displayName: "Alice", avatarURL: nil, userID: "@alice:matrix.org", reason: "Helloooo")]
|
||||
|
||||
var shouldSeeKnockRequests: Bool {
|
||||
isKnockingEnabled && isKnockableRoom && !unseenKnockRequests.isEmpty && (canAcceptKnocks || canDeclineKnocks || canBan)
|
||||
}
|
||||
|
||||
var footerDetails: RoomScreenFooterViewDetails?
|
||||
|
||||
var bindings: RoomScreenViewStateBindings
|
||||
|
||||
Reference in New Issue
Block a user