From 6d109900da9ae8b6c4b543cba152121aba39740b Mon Sep 17 00:00:00 2001 From: tateisu Date: Thu, 23 Aug 2018 13:08:03 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=82=A2=E3=82=AF=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=81=AE=E3=83=9C=E3=82=BF=E3=83=B3=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=81=8C=E3=82=BA=E3=83=AC=E3=81=A6=E3=81=84=E3=81=9F=E3=83=9F?= =?UTF-8?q?=E3=82=B9=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subwaytooter/api/entity/MisskeyReaction.kt | 16 ++++++++-------- .../subwaytooter/api/entity/TootStatus.kt | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/jp/juggler/subwaytooter/api/entity/MisskeyReaction.kt b/app/src/main/java/jp/juggler/subwaytooter/api/entity/MisskeyReaction.kt index 9ff6f4a9..6bae0a96 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/api/entity/MisskeyReaction.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/api/entity/MisskeyReaction.kt @@ -8,16 +8,16 @@ enum class MisskeyReaction( val btnDrawableId : Int ) { - Like("like", R.drawable.emj_1f44d, R.drawable.btn_reaction_angry), - Love("love", R.drawable.emj_2665, R.drawable.btn_reaction_confused), - Laugh("laugh", R.drawable.emj_1f606, R.drawable.btn_reaction_congrats), + Like("like", R.drawable.emj_1f44d, R.drawable.btn_reaction_like), + Love("love", R.drawable.emj_2665, R.drawable.btn_reaction_love), + Laugh("laugh", R.drawable.emj_1f606, R.drawable.btn_reaction_laugh), Hmm("hmm", R.drawable.emj_1f914, R.drawable.btn_reaction_hmm), - Surprise("surprise", R.drawable.emj_1f62e, R.drawable.btn_reaction_laugh), - Congrats("congrats", R.drawable.emj_1f389, R.drawable.btn_reaction_like), - Angry("angry", R.drawable.emj_1f4a2, R.drawable.btn_reaction_love), - Confused("confused", R.drawable.emj_1f625, R.drawable.btn_reaction_pudding), + Surprise("surprise", R.drawable.emj_1f62e, R.drawable.btn_reaction_surprise), + Congrats("congrats", R.drawable.emj_1f389,R.drawable.btn_reaction_congrats), + Angry("angry", R.drawable.emj_1f4a2, R.drawable.btn_reaction_angry), + Confused("confused", R.drawable.emj_1f625,R.drawable.btn_reaction_confused), Rip("rip", R.drawable.emj_1f607, R.drawable.btn_reaction_rip), - Pudding("pudding", R.drawable.emj_1f36e, R.drawable.btn_reaction_surprise) + Pudding("pudding", R.drawable.emj_1f36e, R.drawable.btn_reaction_pudding) ; diff --git a/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootStatus.kt b/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootStatus.kt index bedc181e..267ed213 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootStatus.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootStatus.kt @@ -106,7 +106,7 @@ class TootStatus(parser : TootParser, src : JSONObject) : TimelineItem() { val in_reply_to_id : EntityId? // null or the ID of the account it replies to - private val in_reply_to_account_id : String? + private val in_reply_to_account_id : EntityId? // null or the reblogged Status val reblog : TootStatus? @@ -223,8 +223,9 @@ class TootStatus(parser : TootParser, src : JSONObject) : TimelineItem() { } this.sensitive = bv - this.in_reply_to_id = EntityId.Companion.mayNull(src.parseString("replyId")) - this.in_reply_to_account_id = null + this.reply = parser.status(src.optJSONObject("reply")) + this.in_reply_to_id = EntityId.mayNull(src.parseString("replyId")) + this.in_reply_to_account_id = reply?.account?.id this.pinned = parser.pinned this.muted = false @@ -299,7 +300,6 @@ class TootStatus(parser : TootParser, src : JSONObject) : TimelineItem() { this.reactionCounts = parseReactionCounts(src.optJSONObject("reactionCounts")) this.reblog = parser.status(src.optJSONObject("renote")) - this.reply = parser.status(src.optJSONObject("reply")) this.deletedAt = src.parseString("deletedAt") this.time_deleted_at = parseTime(deletedAt) @@ -387,7 +387,7 @@ class TootStatus(parser : TootParser, src : JSONObject) : TimelineItem() { this._orderId = this.id this.in_reply_to_id = EntityId.mayNull(src.parseLong("in_reply_to_id")) - this.in_reply_to_account_id = src.parseString("in_reply_to_account_id") + this.in_reply_to_account_id = EntityId.mayNull(src.parseLong("in_reply_to_account_id")) this.mentions = parseListOrNull(::TootMention, src.optJSONArray("mentions"), log) this.tags = parseListOrNull(::TootTag, src.optJSONArray("tags")) this.application =