mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
fix: fixed status messages not showing (MESSENGER-6173)
This commit is contained in:
@@ -21,7 +21,6 @@ import Foundation
|
||||
case none = 0
|
||||
case mixed = 1
|
||||
case all = 2
|
||||
case onlyMember = 3
|
||||
}
|
||||
|
||||
@objc class FederationEventHelper: NSObject {
|
||||
@@ -59,23 +58,19 @@ import Foundation
|
||||
}
|
||||
|
||||
@objc func isCollapsedACLEvents( events: [MXEvent]) -> CollapsedACLEvents {
|
||||
var aclEventCount = 0, otherEventCount = 0, memberEventCount = 0
|
||||
var aclEventCount = 0, otherEventCount = 0
|
||||
for event in events {
|
||||
if event.eventType == .roomServerACL {
|
||||
aclEventCount += 1
|
||||
} else if event.eventType == .roomMember {
|
||||
memberEventCount += 1
|
||||
} else {
|
||||
if event.eventType != .roomServerACL {
|
||||
otherEventCount += 1
|
||||
} else {
|
||||
aclEventCount += 1
|
||||
}
|
||||
}
|
||||
|
||||
if aclEventCount > 0 && otherEventCount == 0 && memberEventCount == 0 {
|
||||
if aclEventCount > 0 && otherEventCount == 0 {
|
||||
return .all
|
||||
} else if otherEventCount > 0 && aclEventCount == 0 && memberEventCount == 0 {
|
||||
} else if otherEventCount > 0 && aclEventCount == 0 {
|
||||
return .none
|
||||
} else if memberEventCount > 0 && otherEventCount == 0 && aclEventCount == 0 {
|
||||
return .onlyMember
|
||||
} else {
|
||||
return .mixed
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user