Skip to content

Commit

Permalink
update newMediaDisplay enum feature flag in respective places.
Browse files Browse the repository at this point in the history
  • Loading branch information
pelumy committed Sep 11, 2024
1 parent f7eb244 commit c92b930
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Nos/Views/Note/CompactNoteView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ struct CompactNoteView: View {
.allowsHitTesting(!note.isPreview)
}
if note.kind == EventKind.text.rawValue, showLinkPreviews, !note.contentLinks.isEmpty {
if featureFlags.newMediaDisplayEnabled {
if featureFlags.isEnabled(.newMediaDisplay) {
GalleryView(urls: note.contentLinks, metadata: note.inlineMetadata)
} else {
LinkPreviewCarousel(links: note.contentLinks)
Expand Down
4 changes: 2 additions & 2 deletions Nos/Views/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ extension SettingsView {
/// Whether the new media display is enabled.
private var isNewMediaDisplayEnabled: Binding<Bool> {
Binding<Bool>(
get: { featureFlags.newMediaDisplayEnabled },
set: { featureFlags.setNewMediaDisplayEnabled($0) }
get: { featureFlags.isEnabled(.newMediaDisplay) },
set: { featureFlags.setEnabled(.newMediaDisplay, enabled: $0) }
)
}

Expand Down

0 comments on commit c92b930

Please sign in to comment.