fix: reblog action can not trigger for unlisted post issue
This commit is contained in:
parent
f5addf2430
commit
62ec9a8e8d
|
@ -953,10 +953,15 @@ 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 {
|
||||||
cell.statusView.actionToolbarContainer.reblogButton.isEnabled = false
|
switch visibility {
|
||||||
|
case .public, .unlisted:
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
cell.statusView.actionToolbarContainer.reblogButton.isEnabled = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set like
|
// set like
|
||||||
|
|
Loading…
Reference in New Issue