(Mastodon)Misskeyから流れてきた空欄CWをそれと分かるように表示する

This commit is contained in:
tateisu 2018-12-01 10:25:58 +09:00
parent 55d8a32120
commit 6535575ba3
1 changed files with 7 additions and 2 deletions

View File

@ -453,8 +453,13 @@ class TootStatus(parser : TootParser, src : JSONObject) : TimelineItem() {
this.highlight_sound = options.highlight_sound
}
this.spoiler_text = (src.parseString("spoiler_text") ?: "").cleanCW()
val sv = (src.parseString("spoiler_text")?:"").cleanCW()
this.spoiler_text = when{
sv.isEmpty() ->"" // CWなし
sv.isBlank() ->parser.context.getString(R.string.blank_cw)
else->sv
}
options = DecodeOptions(
parser.context,
emojiMapCustom = custom_emojis,