create feature flag for showing menu options on link item detail view

This commit is contained in:
Satindar Dhillon 2022-03-07 17:45:45 -08:00
parent 2c1d010d6a
commit 0c4d68ae30
2 changed files with 21 additions and 18 deletions

View file

@ -169,25 +169,27 @@ struct LinkItemDetailView: View {
)
.padding(.horizontal)
.scaleEffect(navBarVisibilityRatio)
Menu(
content: {
Group {
Button(
action: {},
label: { Label("Archive", systemImage: "archivebox") }
)
Button(
action: {},
label: { Label("Delete Link", systemImage: "trash") }
)
if FeatureFlag.showLinkOptionsOnReaderView {
Menu(
content: {
Group {
Button(
action: {},
label: { Label("Archive", systemImage: "archivebox") }
)
Button(
action: {},
label: { Label("Delete Link", systemImage: "trash") }
)
}
},
label: {
Image.profile
.padding(.horizontal)
.scaleEffect(navBarVisibilityRatio)
}
},
label: {
Image.profile
.padding(.horizontal)
.scaleEffect(navBarVisibilityRatio)
}
)
)
}
}
.frame(height: readerViewNavBarHeight * navBarVisibilityRatio)
.opacity(navBarVisibilityRatio)

View file

@ -15,4 +15,5 @@ public enum FeatureFlag {
public static let enableShareButton = false
public static let enableSnooze = false
public static let showFeedItemTags = false
public static let showLinkOptionsOnReaderView = false
}