Fix profile action sheet on ipad
Changelog-Fixed: Fix hidden profile action sheet when clicking ...
This commit is contained in:
@@ -130,9 +130,9 @@ struct ConfigView: View {
|
|||||||
|
|
||||||
if state.is_privkey_user {
|
if state.is_privkey_user {
|
||||||
Section(NSLocalizedString("Delete", comment: "Section title for deleting the user")) {
|
Section(NSLocalizedString("Delete", comment: "Section title for deleting the user")) {
|
||||||
Button(NSLocalizedString("Delete Account", comment: "Button to delete the user's account."), role: .destructive) {
|
Button(NSLocalizedString("Delete Account", comment: "Button to delete the user's account."), role: .destructive) {
|
||||||
confirm_delete_account = true
|
confirm_delete_account = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,6 +175,24 @@ struct ProfileView: View {
|
|||||||
Image(systemName: "ellipsis.circle")
|
Image(systemName: "ellipsis.circle")
|
||||||
.profile_button_style(scheme: colorScheme)
|
.profile_button_style(scheme: colorScheme)
|
||||||
}
|
}
|
||||||
|
.confirmationDialog(NSLocalizedString("Actions", comment: "Title for confirmation dialog to either share, report, or block a profile."), isPresented: $action_sheet_presented) {
|
||||||
|
Button(NSLocalizedString("Share", comment: "Button to share the link to a profile.")) {
|
||||||
|
show_share_sheet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only allow reporting if logged in with private key and the currently viewed profile is not the logged in profile.
|
||||||
|
if profile.pubkey != damus_state.pubkey && damus_state.is_privkey_user {
|
||||||
|
Button(NSLocalizedString("Report", comment: "Button to report a profile."), role: .destructive) {
|
||||||
|
let target: ReportTarget = .user(profile.pubkey)
|
||||||
|
notify(.report, target)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button(NSLocalizedString("Block", comment: "Button to block a profile."), role: .destructive) {
|
||||||
|
notify(.block, profile.pubkey)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var ShareButton: some View {
|
var ShareButton: some View {
|
||||||
@@ -375,23 +393,6 @@ struct ProfileView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.confirmationDialog(NSLocalizedString("Actions", comment: "Title for confirmation dialog to either share, report, or block a profile."), isPresented: $action_sheet_presented) {
|
|
||||||
Button(NSLocalizedString("Share", comment: "Button to share the link to a profile.")) {
|
|
||||||
show_share_sheet = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only allow reporting if logged in with private key and the currently viewed profile is not the logged in profile.
|
|
||||||
if profile.pubkey != damus_state.pubkey && damus_state.is_privkey_user {
|
|
||||||
Button(NSLocalizedString("Report", comment: "Button to report a profile."), role: .destructive) {
|
|
||||||
let target: ReportTarget = .user(profile.pubkey)
|
|
||||||
notify(.report, target)
|
|
||||||
}
|
|
||||||
|
|
||||||
Button(NSLocalizedString("Block", comment: "Button to block a profile."), role: .destructive) {
|
|
||||||
notify(.block, profile.pubkey)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.ignoresSafeArea()
|
.ignoresSafeArea()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user