Merge pull request #556 from nossipova/519-toot-menu
Remove mute/block/report from menu for own toots
This commit is contained in:
commit
92ab45f650
|
@ -152,25 +152,30 @@ extension StatusAuthorView {
|
||||||
}
|
}
|
||||||
|
|
||||||
public func setupAuthorMenu(menuContext: AuthorMenuContext) -> (UIMenu, [UIAccessibilityCustomAction]) {
|
public func setupAuthorMenu(menuContext: AuthorMenuContext) -> (UIMenu, [UIAccessibilityCustomAction]) {
|
||||||
var actions: [MastodonMenu.Action] = []
|
var actions = [MastodonMenu.Action]()
|
||||||
|
|
||||||
actions = [
|
if !menuContext.isMyself {
|
||||||
.muteUser(.init(
|
actions.append(contentsOf: [
|
||||||
name: menuContext.name,
|
.muteUser(.init(
|
||||||
isMuting: menuContext.isMuting
|
name: menuContext.name,
|
||||||
)),
|
isMuting: menuContext.isMuting
|
||||||
.blockUser(.init(
|
)),
|
||||||
name: menuContext.name,
|
.blockUser(.init(
|
||||||
isBlocking: menuContext.isBlocking
|
name: menuContext.name,
|
||||||
)),
|
isBlocking: menuContext.isBlocking
|
||||||
.reportUser(
|
)),
|
||||||
.init(name: menuContext.name)
|
.reportUser(
|
||||||
),
|
.init(name: menuContext.name)
|
||||||
|
)
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
actions.append(contentsOf: [
|
||||||
.bookmarkStatus(
|
.bookmarkStatus(
|
||||||
.init(isBookmarking: menuContext.isBookmarking)
|
.init(isBookmarking: menuContext.isBookmarking)
|
||||||
),
|
),
|
||||||
.shareStatus
|
.shareStatus
|
||||||
]
|
])
|
||||||
|
|
||||||
if menuContext.isMyself {
|
if menuContext.isMyself {
|
||||||
actions.append(.deleteStatus)
|
actions.append(.deleteStatus)
|
||||||
|
|
Loading…
Reference in New Issue