mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Remove "history may be shared banner" (#4999)
* Revert "Do not show history visible banner when the user cannot send messages. (#4892)" This reverts commit2e09914cb7. * Revert "Add a banner to encrypted rooms with visible history. (#4851)" This reverts commit6153480d90.
This commit is contained in:
@@ -101,9 +101,6 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
Task { await resolveIdentityPinningViolation(userID) }
|
||||
case .resolveVerificationViolation(let userID):
|
||||
Task { await resolveIdentityVerificationViolation(userID) }
|
||||
case .dismissHistoryVisibleAlert:
|
||||
appSettings.acknowledgedHistoryVisibleRooms.insert(roomProxy.id)
|
||||
state.historyVisibleDetails = nil
|
||||
}
|
||||
case .acceptKnock(let eventID):
|
||||
Task { await acceptKnock(eventID: eventID) }
|
||||
@@ -247,13 +244,13 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
}
|
||||
|
||||
if let member = identityVerificationViolations.values.first {
|
||||
state.identityViolationDetails = .verificationViolation(member: member,
|
||||
learnMoreURL: appSettings.identityPinningViolationDetailsURL)
|
||||
state.footerDetails = .verificationViolation(member: member,
|
||||
learnMoreURL: appSettings.identityPinningViolationDetailsURL)
|
||||
} else if let member = identityPinningViolations.values.first {
|
||||
state.identityViolationDetails = .pinViolation(member: member,
|
||||
learnMoreURL: appSettings.identityPinningViolationDetailsURL)
|
||||
state.footerDetails = .pinViolation(member: member,
|
||||
learnMoreURL: appSettings.identityPinningViolationDetailsURL)
|
||||
} else {
|
||||
state.identityViolationDetails = nil
|
||||
state.footerDetails = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,20 +342,6 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
state.canDeclineKnocks = powerLevels.canOwnUserKick()
|
||||
state.canBan = powerLevels.canOwnUserBan()
|
||||
}
|
||||
|
||||
let isHistoryVisible = roomInfo.historyVisibility == .shared || roomInfo.historyVisibility == .worldReadable
|
||||
let isHistoryVisibleBannerAcknowledged = appSettings.acknowledgedHistoryVisibleRooms.contains(roomInfo.id)
|
||||
|
||||
if appSettings.enableKeyShareOnInvite, roomInfo.isEncrypted {
|
||||
if isHistoryVisible, !isHistoryVisibleBannerAcknowledged {
|
||||
// Whenever the user opens an encrypted room with shared/world-readable history visbility, we show them a warning banner if they have not already dismissed it.
|
||||
state.historyVisibleDetails = .historyVisible(learnMoreURL: appSettings.historySharingDetailsURL)
|
||||
} else if !isHistoryVisible, isHistoryVisibleBannerAcknowledged {
|
||||
// Whenever the user opens a room with non-shared history visibility, we clear the dismiss flag to ensure that the banner is displayed again if the history is made visible in the future.
|
||||
appSettings.acknowledgedHistoryVisibleRooms.remove(roomInfo.id)
|
||||
state.historyVisibleDetails = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func setupPinnedEventsTimelineItemProviderIfNeeded() {
|
||||
|
||||
Reference in New Issue
Block a user