fix: reblog action can not trigger for unlisted post issue
This commit is contained in:
parent
f5addf2430
commit
62ec9a8e8d
|
@ -953,11 +953,16 @@ extension StatusSection {
|
||||||
return L10n.Common.Controls.Timeline.Accessibility.countReblogs(status.reblogsCount.intValue)
|
return L10n.Common.Controls.Timeline.Accessibility.countReblogs(status.reblogsCount.intValue)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// disable reblog when non-public (except self)
|
// disable reblog if needs (except self)
|
||||||
cell.statusView.actionToolbarContainer.reblogButton.isEnabled = true
|
cell.statusView.actionToolbarContainer.reblogButton.isEnabled = true
|
||||||
if let visibility = status.visibilityEnum, visibility != .public, status.author.id != requestUserID {
|
if let visibility = status.visibilityEnum, status.author.id != requestUserID {
|
||||||
|
switch visibility {
|
||||||
|
case .public, .unlisted:
|
||||||
|
break
|
||||||
|
default:
|
||||||
cell.statusView.actionToolbarContainer.reblogButton.isEnabled = false
|
cell.statusView.actionToolbarContainer.reblogButton.isEnabled = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// set like
|
// set like
|
||||||
let isLike = status.favouritedBy.flatMap { $0.contains(where: { $0.id == requestUserID }) } ?? false
|
let isLike = status.favouritedBy.flatMap { $0.contains(where: { $0.id == requestUserID }) } ?? false
|
||||||
|
|
Loading…
Reference in New Issue