Remove mute/block/report from menu for own toots (#519)
This commit is contained in:
parent
23867b0be1
commit
38221e0599
|
@ -152,9 +152,10 @@ extension StatusAuthorView {
|
|||
}
|
||||
|
||||
public func setupAuthorMenu(menuContext: AuthorMenuContext) -> (UIMenu, [UIAccessibilityCustomAction]) {
|
||||
var actions: [MastodonMenu.Action] = []
|
||||
var actions = [MastodonMenu.Action]()
|
||||
|
||||
actions = [
|
||||
if !menuContext.isMyself {
|
||||
actions.append(contentsOf: [
|
||||
.muteUser(.init(
|
||||
name: menuContext.name,
|
||||
isMuting: menuContext.isMuting
|
||||
|
@ -165,12 +166,16 @@ extension StatusAuthorView {
|
|||
)),
|
||||
.reportUser(
|
||||
.init(name: menuContext.name)
|
||||
),
|
||||
)
|
||||
])
|
||||
}
|
||||
|
||||
actions.append(contentsOf: [
|
||||
.bookmarkStatus(
|
||||
.init(isBookmarking: menuContext.isBookmarking)
|
||||
),
|
||||
.shareStatus
|
||||
]
|
||||
])
|
||||
|
||||
if menuContext.isMyself {
|
||||
actions.append(.deleteStatus)
|
||||
|
|
Loading…
Reference in New Issue