Improve status title more
This commit is contained in:
parent
fc8d4a7a0c
commit
e93cd2b5f2
1 changed files with 3 additions and 3 deletions
|
@ -22,9 +22,9 @@ class RSS::Serializer
|
||||||
return "#{status.account.acct} deleted status" if status.destroyed?
|
return "#{status.account.acct} deleted status" if status.destroyed?
|
||||||
|
|
||||||
preview = status.proper.spoiler_text.presence || status.proper.text
|
preview = status.proper.spoiler_text.presence || status.proper.text
|
||||||
if preview.length > 30 || preview[0, 30].include?("\n")
|
if preview.length > 60 || preview[0, 60].include?("\n")
|
||||||
preview = preview[0, 30]
|
preview = preview[0, 60]
|
||||||
preview = preview[0, preview.index("\n").presence || 30] + '…'
|
preview = preview[0, preview.index("\n").presence || 60] + '…'
|
||||||
end
|
end
|
||||||
|
|
||||||
preview = "#{status.proper.spoiler_text.present? ? 'CW ' : ''}“#{preview}”#{status.proper.sensitive? ? ' (sensitive)' : ''}"
|
preview = "#{status.proper.spoiler_text.present? ? 'CW ' : ''}“#{preview}”#{status.proper.sensitive? ? ' (sensitive)' : ''}"
|
||||||
|
|
Loading…
Reference in a new issue