mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-02-09 16:48:47 +01:00
某タンスのプロフ絵文字に対応
This commit is contained in:
parent
c6fa3fa1a1
commit
331356a0c7
@ -186,9 +186,13 @@ open class TootAccount(parser : TootParser, src : JSONObject) {
|
||||
|
||||
// 絵文字データは先に読んでおく
|
||||
this.custom_emojis = parseMapOrNull(CustomEmoji.decode, src.optJSONArray("emojis"))
|
||||
this.profile_emojis =
|
||||
parseMapOrNull(::NicoProfileEmoji, src.optJSONArray("profile_emojis"))
|
||||
|
||||
this.profile_emojis = when(val o = src.opt("profile_emojis")) {
|
||||
is JSONArray -> parseMapOrNull(::NicoProfileEmoji, o, TootStatus.log)
|
||||
is JSONObject ->parseProfileEmoji2(::NicoProfileEmoji, o, TootStatus.log)
|
||||
else -> null
|
||||
}
|
||||
|
||||
// 疑似アカウントにacctとusernameだけ
|
||||
this.url = src.parseString("url")
|
||||
this.username = src.notEmptyOrThrow("username")
|
||||
|
Loading…
x
Reference in New Issue
Block a user