mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Check whether URL previews should be shown in a single location.
Reset all cell data when this setting is changed to force a refresh. Rename `hasClosedPreview(from:)` to `shouldShowPreview(for:)` for clarity and potentially adding more rules at a later date.
This commit is contained in:
@@ -92,9 +92,9 @@ class URLPreviewService: NSObject {
|
||||
store.closePreview(for: eventId, in: roomId)
|
||||
}
|
||||
|
||||
/// Whether a preview for the given event has been closed or not.
|
||||
func hasClosedPreview(from event: MXEvent) -> Bool {
|
||||
store.hasClosedPreview(for: event.eventId, in: event.roomId)
|
||||
/// Whether a preview for the given event should be shown or not.
|
||||
func shouldShowPreview(for event: MXEvent) -> Bool {
|
||||
!store.hasClosedPreview(for: event.eventId, in: event.roomId)
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
Reference in New Issue
Block a user