mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 03:48:27 +00:00
Bump SDK + Mention Badge fix (#2367)
This commit is contained in:
@@ -292,7 +292,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
return HomeScreenRoom(id: identifier,
|
||||
roomId: details.id,
|
||||
name: details.name,
|
||||
hasUnreads: details.unreadMessagesCount > 0,
|
||||
hasUnreads: details.unreadNotificationsCount > 0,
|
||||
hasMentions: hasMentions,
|
||||
hasOngoingCall: details.hasOngoingCall,
|
||||
timestamp: details.lastMessageFormattedTimestamp,
|
||||
|
||||
@@ -225,7 +225,7 @@ struct HomeScreenRoomCell_Previews: PreviewProvider, TestablePreview {
|
||||
return HomeScreenRoom(id: UUID().uuidString,
|
||||
roomId: details.id,
|
||||
name: details.name,
|
||||
hasUnreads: details.unreadMessagesCount > 0, hasMentions: details.unreadMentionsCount > 0,
|
||||
hasUnreads: details.unreadNotificationsCount > 0, hasMentions: details.unreadMentionsCount > 0,
|
||||
hasOngoingCall: details.hasOngoingCall,
|
||||
timestamp: Date(timeIntervalSinceReferenceDate: 0).formattedMinimal(),
|
||||
lastMessage: details.lastMessage,
|
||||
|
||||
@@ -73,7 +73,7 @@ struct InvitesScreen_Previews: PreviewProvider, TestablePreview {
|
||||
NavigationView {
|
||||
InvitesScreen(context: InvitesScreenViewModel.someInvite.context)
|
||||
}
|
||||
.snapshot(delay: 1.0)
|
||||
.snapshot(delay: 2.0)
|
||||
.previewDisplayName("Some Invite")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ private extension InvitesScreenRoomDetails {
|
||||
avatarURL: nil,
|
||||
lastMessage: nil,
|
||||
lastMessageFormattedTimestamp: nil,
|
||||
unreadMessagesCount: 0,
|
||||
unreadNotificationsCount: 0,
|
||||
unreadMentionsCount: 0,
|
||||
notificationMode: nil,
|
||||
canonicalAlias: "#footest:somewhere.org",
|
||||
@@ -207,7 +207,7 @@ private extension InvitesScreenRoomDetails {
|
||||
avatarURL: avatarURL,
|
||||
lastMessage: nil,
|
||||
lastMessageFormattedTimestamp: nil,
|
||||
unreadMessagesCount: 0,
|
||||
unreadNotificationsCount: 0,
|
||||
unreadMentionsCount: 0,
|
||||
notificationMode: nil,
|
||||
canonicalAlias: alias,
|
||||
|
||||
@@ -51,7 +51,7 @@ class RoomScreenInteractionHandler {
|
||||
}
|
||||
|
||||
private var voiceMessageRecorderObserver: AnyCancellable?
|
||||
private var canCurrentUserRedact = false
|
||||
private var canCurrentUserRedactOthers = false
|
||||
private var resumeVoiceMessagePlaybackAfterScrubbing = false
|
||||
|
||||
init(roomProxy: RoomProxyProtocol,
|
||||
@@ -81,10 +81,10 @@ class RoomScreenInteractionHandler {
|
||||
|
||||
func showTimelineItemActionMenu(for itemID: TimelineItemIdentifier) {
|
||||
Task {
|
||||
if case let .success(value) = await roomProxy.canUserRedact(userID: roomProxy.ownUserID) {
|
||||
canCurrentUserRedact = value
|
||||
if case let .success(value) = await roomProxy.canUserRedactOther(userID: roomProxy.ownUserID) {
|
||||
canCurrentUserRedactOthers = value
|
||||
} else {
|
||||
canCurrentUserRedact = false
|
||||
canCurrentUserRedactOthers = false
|
||||
}
|
||||
|
||||
guard let timelineItem = timelineController.timelineItems.firstUsingStableID(itemID),
|
||||
@@ -604,7 +604,7 @@ class RoomScreenInteractionHandler {
|
||||
// MARK: - Private
|
||||
|
||||
private func canRedactItem(_ item: EventBasedTimelineItemProtocol) -> Bool {
|
||||
item.isOutgoing || (canCurrentUserRedact && !roomProxy.isDirect)
|
||||
item.isOutgoing || (canCurrentUserRedactOthers && !roomProxy.isDirect)
|
||||
}
|
||||
|
||||
private func buildReplyInfo(for item: EventBasedTimelineItemProtocol) -> ReplyInfo {
|
||||
|
||||
Reference in New Issue
Block a user