mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Use local room list sorting from Rust. (#2978)
* Switch to the new local room list sorting API * Get rid of the RoomSummary enum, replace it by the inner RoomSummaryDetails * And finally, rename RoomSummaryDetails to RoomSummary * Fix a bunch of warnings * Small tidy up post rebase/review. - Remove unused invalidated property. - Rename some RoomSummary instances to summary instead of details. - Fix tests with missing roomListItem's. * Update snapshots --------- Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
@@ -81,29 +81,30 @@ class LoggingTests: XCTestCase {
|
||||
|
||||
XCTAssertTrue(logFile.lastPathComponent.contains(target))
|
||||
}
|
||||
|
||||
|
||||
func validateRoomSummaryContentIsRedacted() throws {
|
||||
// Given a room summary that contains sensitive information
|
||||
let roomName = "Private Conversation"
|
||||
let lastMessage = "Secret information"
|
||||
let heroName = "Pseudonym"
|
||||
let roomSummary = RoomSummaryDetails(id: "myroomid",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: roomName,
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
heroes: [.init(userID: "", displayName: heroName)],
|
||||
lastMessage: AttributedString(lastMessage),
|
||||
lastMessageFormattedTimestamp: "Now",
|
||||
unreadMessagesCount: 0,
|
||||
unreadMentionsCount: 0,
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: nil,
|
||||
canonicalAlias: nil,
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)
|
||||
let roomSummary = RoomSummary(roomListItem: .init(noPointer: .init()),
|
||||
id: "myroomid",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: roomName,
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
heroes: [.init(userID: "", displayName: heroName)],
|
||||
lastMessage: AttributedString(lastMessage),
|
||||
lastMessageFormattedTimestamp: "Now",
|
||||
unreadMessagesCount: 0,
|
||||
unreadMentionsCount: 0,
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: nil,
|
||||
canonicalAlias: nil,
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)
|
||||
|
||||
// When logging that value
|
||||
MXLog.info(roomSummary)
|
||||
|
||||
Reference in New Issue
Block a user