mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
State events filtering + Bump sdk (#2404)
This commit is contained in:
@@ -6732,7 +6732,7 @@
|
|||||||
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = 1.1.35;
|
version = 1.1.36;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
||||||
|
|||||||
@@ -130,8 +130,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "b7ed8b30a1b648ebdf87bb14a11f071df4999e03",
|
"revision" : "e6aecad747a12e399ee718b5fb2ece45b7b6e23a",
|
||||||
"version" : "1.1.35"
|
"version" : "1.1.36"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -586,14 +586,35 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private let eventFilters: TimelineEventTypeFilter = {
|
||||||
|
let stateEventFilters: [FilterStateEventType] = [.roomAliases,
|
||||||
|
.roomCanonicalAlias,
|
||||||
|
.roomGuestAccess,
|
||||||
|
.roomHistoryVisibility,
|
||||||
|
.roomJoinRules,
|
||||||
|
.roomPinnedEvents,
|
||||||
|
.roomPowerLevels,
|
||||||
|
.roomServerAcl,
|
||||||
|
.roomTombstone,
|
||||||
|
.spaceChild,
|
||||||
|
.spaceParent,
|
||||||
|
.policyRuleRoom,
|
||||||
|
.policyRuleServer]
|
||||||
|
|
||||||
|
return .exclude(eventTypes: stateEventFilters.map { FilterTimelineEventType.state(eventType: $0) })
|
||||||
|
}()
|
||||||
|
|
||||||
private func roomTupleForIdentifier(_ identifier: String) async -> (RoomListItem?, Room?) {
|
private func roomTupleForIdentifier(_ identifier: String) async -> (RoomListItem?, Room?) {
|
||||||
do {
|
do {
|
||||||
let roomListItem = try roomListService?.room(roomId: identifier)
|
let roomListItem = try roomListService?.room(roomId: identifier)
|
||||||
let fullRoom = await roomListItem?.fullRoom()
|
if roomListItem?.isTimelineInitialized() == false {
|
||||||
|
try await roomListItem?.initTimeline(eventTypeFilter: eventFilters)
|
||||||
|
}
|
||||||
|
let fullRoom = try await roomListItem?.fullRoom()
|
||||||
|
|
||||||
return (roomListItem, fullRoom)
|
return (roomListItem, fullRoom)
|
||||||
} catch {
|
} catch {
|
||||||
MXLog.error("Failed retrieving room with identifier: \(identifier)")
|
MXLog.error("Failed retrieving/initialising room with identifier: \(identifier)")
|
||||||
return (nil, nil)
|
return (nil, nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
The timeline will filter some unnecessary state events.
|
||||||
+1
-1
@@ -47,7 +47,7 @@ packages:
|
|||||||
# Element/Matrix dependencies
|
# Element/Matrix dependencies
|
||||||
MatrixRustSDK:
|
MatrixRustSDK:
|
||||||
url: https://github.com/matrix-org/matrix-rust-components-swift
|
url: https://github.com/matrix-org/matrix-rust-components-swift
|
||||||
exactVersion: 1.1.35
|
exactVersion: 1.1.36
|
||||||
# path: ../matrix-rust-sdk
|
# path: ../matrix-rust-sdk
|
||||||
Compound:
|
Compound:
|
||||||
url: https://github.com/element-hq/compound-ios
|
url: https://github.com/element-hq/compound-ios
|
||||||
|
|||||||
Reference in New Issue
Block a user