Commit 4d1b3405 authored by Takeshi Umeda's avatar Takeshi Umeda
Browse files

Improve status title more

parent 33aed426
......@@ -22,9 +22,9 @@ class RSS::Serializer
return "#{status.account.acct} deleted status" if status.destroyed?
preview = status.proper.spoiler_text.presence || status.proper.text
if preview.length > 30 || preview[0, 30].include?("\n")
preview = preview[0, 30]
preview = preview[0, preview.index("\n").presence || 30] + '…'
if preview.length > 60 || preview[0, 60].include?("\n")
preview = preview[0, 60]
preview = preview[0, preview.index("\n").presence || 60] + '…'
end
preview = "#{status.proper.spoiler_text.present? ? 'CW ' : ''}#{preview}#{status.proper.sensitive? ? ' (sensitive)' : ''}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment