From 03115d796c0aec5f75fb64bb92831787f9db8c7c Mon Sep 17 00:00:00 2001 From: tateisu Date: Sun, 16 Feb 2020 17:13:11 +0900 Subject: [PATCH] =?UTF-8?q?Misskey=E3=81=AE=E3=83=95=E3=82=A9=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=AA=E3=82=AF=E3=82=A8=E3=82=B9=E3=83=88=E6=89=BF?= =?UTF-8?q?=E8=AA=8D=E9=80=9A=E7=9F=A5=E3=81=AB=E5=AF=BE=E5=BF=9C=E3=80=82?= =?UTF-8?q?=E9=81=B8=E6=8A=9E=E3=81=97=E3=81=A6=E3=82=B3=E3=83=94=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=80=8C=5FfromStream=E3=80=8D=E3=81=AE=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=82=92=E8=BF=BD=E5=8A=A0=E3=80=82AccountRef?= =?UTF-8?q?=E3=81=AE=E3=82=AD=E3=83=BC=E3=81=ABMisskey=E3=81=AE=E5=8F=96?= =?UTF-8?q?=E5=BE=97=E3=83=9B=E3=82=B9=E3=83=88=E3=81=8C=E6=AC=A0=E3=81=91?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=9F=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/jp/juggler/subwaytooter/Column.kt | 17 ++- .../juggler/subwaytooter/ColumnViewHolder.kt | 3 +- .../jp/juggler/subwaytooter/ItemViewHolder.kt | 124 +++++++++++------- .../jp/juggler/subwaytooter/PollingWorker.kt | 13 +- .../jp/juggler/subwaytooter/StreamReader.kt | 49 +++---- .../subwaytooter/api/TootAccountMap.kt | 9 +- .../jp/juggler/subwaytooter/api/TootParser.kt | 3 +- .../subwaytooter/api/entity/TootAccount.kt | 1 + .../api/entity/TootNotification.kt | 14 +- .../subwaytooter/api/entity/TootStatus.kt | 1 + .../subwaytooter/table/SavedAccount.kt | 7 +- app/src/main/res/values-ja/strings.xml | 3 +- app/src/main/res/values/strings.xml | 1 + 13 files changed, 144 insertions(+), 101 deletions(-) diff --git a/app/src/main/java/jp/juggler/subwaytooter/Column.kt b/app/src/main/java/jp/juggler/subwaytooter/Column.kt index f64f4ea7..128ee34d 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/Column.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/Column.kt @@ -1570,7 +1570,8 @@ class Column( TootNotification.TYPE_FOLLOW, TootNotification.TYPE_UNFOLLOW, TootNotification.TYPE_FOLLOW_REQUEST, - TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY -> dont_show_follow + TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY, + TootNotification.TYPE_FOLLOW_REQUEST_ACCEPTED_MISSKEY -> dont_show_follow TootNotification.TYPE_MENTION, TootNotification.TYPE_REPLY -> dont_show_reply @@ -1578,7 +1579,8 @@ class Column( TootNotification.TYPE_REACTION -> dont_show_reaction TootNotification.TYPE_VOTE, - TootNotification.TYPE_POLL -> dont_show_vote + TootNotification.TYPE_POLL, + TootNotification.TYPE_POLL_VOTE_MISSKEY -> dont_show_vote else -> false } @@ -1591,13 +1593,16 @@ class Column( TootNotification.TYPE_FOLLOW, TootNotification.TYPE_UNFOLLOW, TootNotification.TYPE_FOLLOW_REQUEST, - TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY -> quick_filter != QUICK_FILTER_FOLLOW + TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY , + TootNotification.TYPE_FOLLOW_REQUEST_ACCEPTED_MISSKEY -> quick_filter != QUICK_FILTER_FOLLOW TootNotification.TYPE_MENTION, TootNotification.TYPE_REPLY -> quick_filter != QUICK_FILTER_MENTION TootNotification.TYPE_REACTION -> quick_filter != QUICK_FILTER_REACTION + TootNotification.TYPE_VOTE, - TootNotification.TYPE_POLL -> quick_filter != QUICK_FILTER_VOTE + TootNotification.TYPE_POLL, + TootNotification.TYPE_POLL_VOTE_MISSKEY -> quick_filter != QUICK_FILTER_VOTE else -> true } }) { @@ -1630,10 +1635,10 @@ class Column( TootNotification.TYPE_QUOTE, TootNotification.TYPE_FAVOURITE, TootNotification.TYPE_REACTION, - TootNotification.TYPE_VOTE, TootNotification.TYPE_FOLLOW, TootNotification.TYPE_FOLLOW_REQUEST, - TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY -> { + TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY, + TootNotification.TYPE_FOLLOW_REQUEST_ACCEPTED_MISSKEY -> { val who = item.account if(who != null && favMuteSet?.contains(access_info.getFullAcct(who)) == true) { log.d("%s is in favMuteSet.", access_info.getFullAcct(who)) diff --git a/app/src/main/java/jp/juggler/subwaytooter/ColumnViewHolder.kt b/app/src/main/java/jp/juggler/subwaytooter/ColumnViewHolder.kt index 04184fb5..7b93f36f 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/ColumnViewHolder.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/ColumnViewHolder.kt @@ -1706,7 +1706,8 @@ class ColumnViewHolder( } tvColumnName = textView { - + // Kannada語の "ಸ್ಥಳೀಯ ಟೈಮ್ ಲೈನ್" の上下が途切れることがあるらしい + // GS10+では再現しなかった }.lparams(dip(0), wrapContent) { weight = 1f } diff --git a/app/src/main/java/jp/juggler/subwaytooter/ItemViewHolder.kt b/app/src/main/java/jp/juggler/subwaytooter/ItemViewHolder.kt index 3a856d25..66304b70 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/ItemViewHolder.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/ItemViewHolder.kt @@ -575,7 +575,7 @@ internal class ItemViewHolder( val whoRef = TootAccountRef(TootParser(activity, access_info), who) this.status_account = whoRef - setAcct(tvAcct, access_info,who) + setAcct(tvAcct, access_info, who) tvName.text = whoRef.decoded_display_name name_invalidator.register(whoRef.decoded_display_name) @@ -927,7 +927,43 @@ internal class ItemViewHolder( } } - TootNotification.TYPE_VOTE -> { + TootNotification.TYPE_FOLLOW_REQUEST, + TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY -> { + val colorBg = Pref.ipEventBgColorFollowRequest(activity.pref) + if(n_account != null) { + showBoost( + n_accountRef, + n.time_created_at, + R.drawable.ic_follow_wait, + R.string.display_name_follow_request_by + ) + if(colorBg != 0) this.viewRoot.backgroundColor = colorBg + boostedAction = { + activity.addColumn( + activity.nextPosition(column) + , access_info + , ColumnType.FOLLOW_REQUESTS + ) + } + } + } + + TootNotification.TYPE_FOLLOW_REQUEST_ACCEPTED_MISSKEY -> { + val colorBg = Pref.ipEventBgColorFollow(activity.pref) + if(n_account != null) { + showBoost( + n_accountRef, + n.time_created_at, + R.drawable.ic_follow_plus, + R.string.display_name_follow_request_accepted_by + ) + showAccount(n_accountRef) + if(colorBg != 0) this.viewRoot.backgroundColor = colorBg + } + } + + TootNotification.TYPE_VOTE, + TootNotification.TYPE_POLL_VOTE_MISSKEY -> { val colorBg = Pref.ipEventBgColorVote(activity.pref) if(n_account != null) showBoost( n_accountRef, @@ -940,25 +976,6 @@ internal class ItemViewHolder( } } - TootNotification.TYPE_FOLLOW_REQUEST, - TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY -> { - val colorBg = Pref.ipEventBgColorFollowRequest(activity.pref) - if(n_account != null) showBoost( - n_accountRef, - n.time_created_at, - R.drawable.ic_follow_wait, - R.string.display_name_follow_request_by - ) - viewRoot.backgroundColor = colorBg - boostedAction = { - activity.addColumn( - activity.nextPosition(column) - , access_info - , ColumnType.FOLLOW_REQUESTS - ) - } - } - TootNotification.TYPE_POLL -> { val colorBg = 0 if(n_account != null) showBoost( @@ -1089,7 +1106,7 @@ internal class ItemViewHolder( private fun showReply(reply : TootStatus, accountId : EntityId) { val name = if(accountId == reply.account.id) { // 自己レスなら - AcctColor.getNicknameWithColor(access_info,reply.account) + AcctColor.getNicknameWithColor(access_info, reply.account) } else { val m = reply.mentions?.find { it.id == accountId } if(m != null) { @@ -1117,13 +1134,9 @@ internal class ItemViewHolder( boost_account = whoRef val who = whoRef.get() - val text : Spannable = if(string_id == R.string.display_name_followed_by) { - // フォローの場合 decoded_display_name が2箇所で表示に使われるのを避ける必要がある - who.decodeDisplayName(activity) - } else { - // それ以外の場合は decoded_display_name を再利用して構わない - whoRef.decoded_display_name - }.intoStringResource(activity, string_id) + // フォローの場合 decoded_display_name が2箇所で表示に使われるのを避ける必要がある + val text : Spannable =who.decodeDisplayName(activity) + .intoStringResource(activity, string_id) val emojiResource = misskeyReaction?.emojiResource if(emojiResource != null) { @@ -1144,7 +1157,7 @@ internal class ItemViewHolder( showStatusTime(activity, tvBoostedTime, who, time = time, status = boost_status) tvBoosted.text = text boost_invalidator.register(text) - setAcct(tvBoostedAcct, access_info,who) + setAcct(tvBoostedAcct, access_info, who) } private fun showAccount(whoRef : TootAccountRef) { @@ -1162,7 +1175,7 @@ internal class ItemViewHolder( tvFollowerName.text = whoRef.decoded_display_name follow_invalidator.register(whoRef.decoded_display_name) - setAcct(tvFollowerAcct, access_info,who) + setAcct(tvFollowerAcct, access_info, who) who.setAccountExtra(access_info, tvLastStatusAt, lastActive_invalidator) @@ -1231,7 +1244,7 @@ internal class ItemViewHolder( val who = whoRef.get() this.status_account = whoRef - setAcct(tvAcct, access_info,who) + setAcct(tvAcct, access_info, who) // if(who == null) { // tvName.text = "?" @@ -1623,8 +1636,8 @@ internal class ItemViewHolder( // } // } - private fun setAcct(tv : TextView,accessInfo:SavedAccount,who:TootAccount) { - val ac = AcctColor.load(accessInfo,who) + private fun setAcct(tv : TextView, accessInfo : SavedAccount, who : TootAccount) { + val ac = AcctColor.load(accessInfo, who) tv.text = when { AcctColor.hasNickname(ac) -> ac.nickname Pref.bpShortAcctLocalUser(App1.pref) -> "@${who.acct.pretty}" @@ -1767,10 +1780,10 @@ internal class ItemViewHolder( when(v) { btnHideMedia, btnCardImageHide -> { - fun hideViews(){ + fun hideViews() { llMedia.visibility = View.GONE btnShowMedia.visibility = View.VISIBLE - llCardImage.visibility =View.GONE + llCardImage.visibility = View.GONE btnCardImageShow.visibility = View.VISIBLE } status_showing?.let { status -> @@ -1784,10 +1797,10 @@ internal class ItemViewHolder( } btnShowMedia, btnCardImageShow -> { - fun showViews(){ + fun showViews() { llMedia.visibility = View.VISIBLE btnShowMedia.visibility = View.GONE - llCardImage.visibility =View.VISIBLE + llCardImage.visibility = View.VISIBLE btnCardImageShow.visibility = View.GONE } status_showing?.let { status -> @@ -1887,7 +1900,12 @@ internal class ItemViewHolder( is TootDomainBlock -> { AlertDialog.Builder(activity) - .setMessage(activity.getString(R.string.confirm_unblock_domain, item.domain.pretty)) + .setMessage( + activity.getString( + R.string.confirm_unblock_domain, + item.domain.pretty + ) + ) .setNegativeButton(R.string.cancel, null) .setPositiveButton(R.string.ok) { _, _ -> Action_Instance.blockDomain( @@ -1957,7 +1975,7 @@ internal class ItemViewHolder( activity, activity.getString( R.string.follow_accept_confirm, - AcctColor.getNickname(access_info,who) + AcctColor.getNickname(access_info, who) ) ) { Action_Follow.authorizeFollowRequest(activity, access_info, whoRef, true) @@ -1970,7 +1988,7 @@ internal class ItemViewHolder( activity, activity.getString( R.string.follow_deny_confirm, - AcctColor.getNickname(access_info,who) + AcctColor.getNickname(access_info, who) ) ) { Action_Follow.authorizeFollowRequest(activity, access_info, whoRef, false) @@ -2262,11 +2280,11 @@ internal class ItemViewHolder( } val image = card.image - if(flCardImage.vg(image?.isNotEmpty()==true) !=null) { + if(flCardImage.vg(image?.isNotEmpty() == true) != null) { - flCardImage.layoutParams.height = if(card.originalStatus!=null){ + flCardImage.layoutParams.height = if(card.originalStatus != null) { activity.avatarIconSize - }else{ + } else { activity.app_state.media_thumb_height } @@ -2424,7 +2442,7 @@ internal class ItemViewHolder( R.drawable.btn_bg_transparent_round6dp ) // TODO 自分がリアクションしたやつは背景を変える - + setTextColor(content_color) setPadding(paddingH, paddingV, paddingH, paddingV) setOnClickListener { @@ -3168,7 +3186,8 @@ internal class ItemViewHolder( llFollow = linearLayout { lparams(matchParent, wrapContent) - background = ContextCompat.getDrawable(context, R.drawable.btn_bg_transparent_round6dp) + background = + ContextCompat.getDrawable(context, R.drawable.btn_bg_transparent_round6dp) gravity = Gravity.CENTER_VERTICAL ivFollow = myNetworkImageView { @@ -3208,7 +3227,10 @@ internal class ItemViewHolder( btnFollow = imageButton { background = - ContextCompat.getDrawable(context, R.drawable.btn_bg_transparent_round6dp) + ContextCompat.getDrawable( + context, + R.drawable.btn_bg_transparent_round6dp + ) contentDescription = context.getString(R.string.follow) scaleType = ImageView.ScaleType.CENTER // tools:src="?attr/ic_follow_plus" @@ -3255,7 +3277,10 @@ internal class ItemViewHolder( ivThumbnail = myNetworkImageView { background = - ContextCompat.getDrawable(context, R.drawable.btn_bg_transparent_round6dp) + ContextCompat.getDrawable( + context, + R.drawable.btn_bg_transparent_round6dp + ) contentDescription = context.getString(R.string.thumbnail) scaleType = ImageView.ScaleType.CENTER_CROP }.lparams(dip(48), dip(48)) { @@ -3708,7 +3733,8 @@ internal class ItemViewHolder( lparams(matchParent, wrapContent) gravity = Gravity.CENTER_VERTICAL - background = ContextCompat.getDrawable(context, R.drawable.btn_bg_transparent_round6dp) + background = + ContextCompat.getDrawable(context, R.drawable.btn_bg_transparent_round6dp) verticalLayout { lparams(0, wrapContent) { diff --git a/app/src/main/java/jp/juggler/subwaytooter/PollingWorker.kt b/app/src/main/java/jp/juggler/subwaytooter/PollingWorker.kt index b522345b..4ddf2fbf 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/PollingWorker.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/PollingWorker.kt @@ -1569,15 +1569,16 @@ class PollingWorker private constructor(contextArg : Context) { TootNotification.TYPE_REACTION -> "- " + context.getString(R.string.display_name_reaction_by, name) - TootNotification.TYPE_VOTE -> + TootNotification.TYPE_VOTE, + TootNotification.TYPE_POLL_VOTE_MISSKEY -> "- " + context.getString(R.string.display_name_voted_by, name) TootNotification.TYPE_FOLLOW_REQUEST, - TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY -> - "- " + context.getString( - R.string.display_name_follow_request_by, - name - ) + TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY-> + "- " + context.getString( R.string.display_name_follow_request_by, name ) + + TootNotification.TYPE_FOLLOW_REQUEST_ACCEPTED_MISSKEY -> + "- " + context.getString( R.string.display_name_follow_request_accepted_by, name ) TootNotification.TYPE_POLL -> "- " + context.getString(R.string.end_of_polling_from, name) diff --git a/app/src/main/java/jp/juggler/subwaytooter/StreamReader.kt b/app/src/main/java/jp/juggler/subwaytooter/StreamReader.kt index 4a51c9e7..e0f6091e 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/StreamReader.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/StreamReader.kt @@ -55,8 +55,7 @@ internal class StreamReader( internal val bListening = AtomicBoolean() internal val socket = AtomicReference(null) internal val callback_list = LinkedList() - internal val parser : TootParser = - TootParser(context, access_info, highlightTrie = highlight_trie) + internal val parser : TootParser = TootParser(context, access_info, highlightTrie = highlight_trie,fromStream=true) internal fun dispose() { bDisposed.set(true) @@ -184,13 +183,15 @@ internal class StreamReader( private fun handleMisskeyMessage(obj : JsonObject, channelId : String? = null) { val type = obj.string("type") - if(type?.isEmpty() != false) { - log.d("handleMisskeyMessage: missing type parameter") - return - } - when(type) { + when( type){ + null,"" -> { + log.d("handleMisskeyMessage: missing type parameter") + return + } "channel" -> { + // ストリーミングのchannelイベントにチャネルIDが含まれない場合がある + // https://github.com/syuilo/misskey/issues/4801 val body = obj.jsonObject("body") if(body == null) { log.e("handleMisskeyMessage: channel body is null") @@ -200,31 +201,22 @@ internal class StreamReader( // ストリーミングのchannelイベントにチャネルIDが含まれない場合がある // https://github.com/syuilo/misskey/issues/4801 handleMisskeyMessage(body, id) + return } - "readAllNotifications" -> { - // nothing to do - } - - // Misskey 11ではこれらのメッセージの形式が違う - "followed", "renote", "mention", "meUpdated", "follow", "unfollow" -> { + // 通知IDも日時もないイベントを受け取っても通知TLに反映させられないから無視するしかない + // https://github.com/syuilo/misskey/issues/4802 + "followed", "renote", "mention", "meUpdated", "follow", "unfollow"-> return - // {"id":"15","type":"followed","body":{"id":"7rm8yhnvzd","name":null,"username":"tateisu_test2","host":null,"avatarUrl":"https:\/\/misskey.io\/avatar\/7rm8yhnvzd","avatarColor":null,"emojis":[]}} - // {"id":"15","type":"renote","body":{"id":"7s063vasr4","createdAt":"2019-04-25T12:08:32.308Z","userId":"7rm8yhnvzd","user":{"id":"7rm8yhnvzd","name":null,"username":"tateisu_test2","host":null,"avatarUrl":"https://misskey.io/avatar/7rm8yhnvzd","avatarColor":null,"emojis":[]},"text":null,"cw":null,"visibility":"home","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":"7s04q1lagw","renote":{"id":"7s04q1lagw","createdAt":"2019-04-25T11:29:47.662Z","userId":"7rm6y6thc1","user":{"id":"7rm6y6thc1","name":null,"username":"tateisu","host":null,"avatarUrl":"https://pdg1.arkjp.net/misskey/drive/19c55428-7e2d-4050-86c4-39aa20bef593.jpg","avatarColor":"rgba(203,205,189,0)","emojis":[]},"text":"リストTLやタグTLのストリーミングチャネルはないんだろうか? #MisskeyApi","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null}}}} - // {"id":"15","type":"mention","body":{"id":"7s067jr5jq","createdAt":"2019-04-25T12:11:23.969Z","userId":"7rm8yhnvzd","user":{"id":"7rm8yhnvzd","name":null,"username":"tateisu_test2","host":null,"avatarUrl":"https://misskey.io/avatar/7rm8yhnvzd","avatarColor":null,"emojis":[]},"text":"test","cw":null,"visibility":"home","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":"7s04q1lagw","renoteId":null,"mentions":["7rm6y6thc1"],"reply":{"id":"7s04q1lagw","createdAt":"2019-04-25T11:29:47.662Z","userId":"7rm6y6thc1","user":{"id":"7rm6y6thc1","name":null,"username":"tateisu","host":null,"avatarUrl":"https://pdg1.arkjp.net/misskey/drive/19c55428-7e2d-4050-86c4-39aa20bef593.jpg","avatarColor":"rgba(203,205,189,0)","emojis":[]},"text":"リストTLやタグTLのストリーミングチャネルはないんだろうか? #MisskeyApi","cw":null,"visibility":"public","renoteCount":1,"repliesCount":1,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null}}}} - // - // {"type":"channel","body":{"id":"15","type":"mention","body":{"id":"7s067jr5jq","createdAt":"2019-04-25T12:11:23.969Z","userId":"7rm8yhnvzd","user":{"id":"7rm8yhnvzd","name":null,"username":"tateisu_test2","host":null,"avatarUrl":"https:\/\/misskey.io\/avatar\/7rm8yhnvzd","avatarColor":null,"emojis":[]},"text":"test","cw":null,"visibility":"home","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":"7s04q1lagw","renoteId":null,"mentions":["7rm6y6thc1"],"reply":{"id":"7s04q1lagw","createdAt":"2019-04-25T11:29:47.662Z","userId":"7rm6y6thc1","user":{"id":"7rm6y6thc1","name":null,"username":"tateisu","host":null,"avatarUrl":"https:\/\/pdg1.arkjp.net\/misskey\/drive\/19c55428-7e2d-4050-86c4-39aa20bef593.jpg","avatarColor":"rgba(203,205,189,0)","emojis":[]},"text":"リストTLやタグTLのストリーミングチャネルはないんだろうか? #MisskeyApi","cw":null,"visibility":"public","renoteCount":1,"repliesCount":1,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null}}}} - // {"type":"channel","body":{"id":"15","type":"meUpdated","body":{"id":"7rm6y6thc1","name":null,"username":"tateisu","host":null,"avatarUrl":"https://pdg1.arkjp.net/misskey/drive/19c55428-7e2d-4050-86c4-39aa20bef593.jpg","avatarColor":"rgba(203,205,189,0)","isAdmin":false,"isBot":false,"isCat":false,"isVerified":false,"emojis":[],"url":null,"createdAt":"2019-04-15T17:23:20.453Z","updatedAt":"2019-04-25T12:07:41.334Z","bannerUrl":null,"bannerColor":null,"isLocked":false,"isModerator":false,"description":"がうがう","location":null,"birthday":null,"followersCount":14,"followingCount":10,"notesCount":65,"pinnedNoteIds":[],"pinnedNotes":[],"avatarId":"7rm8fefuft","bannerId":null,"autoWatch":false,"alwaysMarkNsfw":false,"carefulBot":false,"twoFactorEnabled":false,"hasUnreadMessagingMessage":false,"hasUnreadNotification":false,"pendingReceivedFollowRequestsCount":0,"clientData":{},"email":null,"emailVerified":false}}} - // {"type":"channel","body":{"id":"15","type":"unfollow","body":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isAdmin":false,"isBot":true,"isCat":false,"isVerified":false,"emojis":[],"url":"https://friends.nico/@vandojpn","createdAt":"2019-04-15T11:44:21.907Z","updatedAt":"2019-04-25T12:13:59.839Z","bannerUrl":"https://pdg1.arkjp.net/misskey/drive/a091e3ef-e1b8-4460-bdd9-f47ea2e9f9f2.jpeg","bannerColor":"rgba(135,128,127,0)","isLocked":false,"isModerator":false,"description":"居場所亡くなったので\n移住先候補\n@vandojpn@mstdn.jp\n@vando@misskey.io","location":null,"birthday":null,"followersCount":2,"followingCount":0,"notesCount":353,"pinnedNoteIds":["7il4rez4b9","7qw3bj7kb0","7qw3cvtkbr","7qxtyp609n","7qyuxfswax"],"pinnedNotes":[{"id":"7il4rez4b9","createdAt":"2018-08-31T05:36:58.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"†┏┛:@vandojpn:┗┓†","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/100643230103007331"},{"id":"7qw3bj7kb0","createdAt":"2019-03-28T10:59:44.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"まさらっき、ハト先生、2年間お疲れ様。","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101827922107489261"},{"id":"7qw3cvtkbr","createdAt":"2019-03-28T11:00:47.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"引越し先はこちらです。みんなフォロしてね!\n\nhttps://misskey.xyz/@vando","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101827926245185143"},{"id":"7qxtyp609n","createdAt":"2019-03-29T16:13:21.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"Thank you and Good bye friends.nico for 2 years.\nfriends.nico はみんなの心の中に。","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101834817646842776"},{"id":"7qyuxfswax","createdAt":"2019-03-30T09:28:08.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"二コフレ終了の移住先候補\n\nhttps://misskey.xyz/@vando\n\nhttps://mstdn.jp/@vandojpn\n\n艦これ https://kancolle.social/@vando\n\nTwitter https://twitter.com/vajpn\n\n#theboss_tech \n#クロス\n#friends_nico","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101838886557246239"}],"isFollowing":true,"isFollowed":false,"hasPendingFollowRequestFromYou":false,"hasPendingFollowRequestToYou":false,"isBlocking":false,"isBlocked":false,"isMuted":false}}} - // {"type":"channel","body":{"id":"15","type":"follow","body":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isAdmin":false,"isBot":true,"isCat":false,"isVerified":false,"emojis":[],"url":"https://friends.nico/@vandojpn","createdAt":"2019-04-15T11:44:21.907Z","updatedAt":"2019-04-25T12:13:59.839Z","bannerUrl":"https://pdg1.arkjp.net/misskey/drive/a091e3ef-e1b8-4460-bdd9-f47ea2e9f9f2.jpeg","bannerColor":"rgba(135,128,127,0)","isLocked":false,"isModerator":false,"description":"居場所亡くなったので\n移住先候補\n@vandojpn@mstdn.jp\n@vando@misskey.io","location":null,"birthday":null,"followersCount":1,"followingCount":0,"notesCount":353,"pinnedNoteIds":["7il4rez4b9","7qw3bj7kb0","7qw3cvtkbr","7qxtyp609n","7qyuxfswax"],"pinnedNotes":[{"id":"7il4rez4b9","createdAt":"2018-08-31T05:36:58.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"†┏┛:@vandojpn:┗┓†","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/100643230103007331"},{"id":"7qw3bj7kb0","createdAt":"2019-03-28T10:59:44.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"まさらっき、ハト先生、2年間お疲れ様。","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101827922107489261"},{"id":"7qw3cvtkbr","createdAt":"2019-03-28T11:00:47.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"引越し先はこちらです。みんなフォロしてね!\n\nhttps://misskey.xyz/@vando","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101827926245185143"},{"id":"7qxtyp609n","createdAt":"2019-03-29T16:13:21.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"Thank you and Good bye friends.nico for 2 years.\nfriends.nico はみんなの心の中に。","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101834817646842776"},{"id":"7qyuxfswax","createdAt":"2019-03-30T09:28:08.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"二コフレ終了の移住先候補\n\nhttps://misskey.xyz/@vando\n\nhttps://mstdn.jp/@vandojpn\n\n艦これ https://kancolle.social/@vando\n\nTwitter https://twitter.com/vajpn\n\n#theboss_tech \n#クロス\n#friends_nico","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101838886557246239"}],"isFollowing":true,"isFollowed":false,"hasPendingFollowRequestFromYou":false,"hasPendingFollowRequestToYou":false,"isBlocking":false,"isBlocked":false,"isMuted":false}}} - // - // {"type":"channel","body":{"id":"15","type":"follow","body":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isAdmin":false,"isBot":true,"isCat":false,"isVerified":false,"emojis":[],"url":"https://friends.nico/@vandojpn","createdAt":"2019-04-15T11:44:21.907Z","updatedAt":"2019-04-25T12:13:59.839Z","bannerUrl":"https://pdg1.arkjp.net/misskey/drive/a091e3ef-e1b8-4460-bdd9-f47ea2e9f9f2.jpeg","bannerColor":"rgba(135,128,127,0)","isLocked":false,"isModerator":false,"description":"居場所亡くなったので\n移住先候補\n@vandojpn@mstdn.jp\n@vando@misskey.io","location":null,"birthday":null,"followersCount":1,"followingCount":0,"notesCount":353,"pinnedNoteIds":["7il4rez4b9","7qw3bj7kb0","7qw3cvtkbr","7qxtyp609n","7qyuxfswax"],"pinnedNotes":[{"id":"7il4rez4b9","createdAt":"2018-08-31T05:36:58.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"†┏┛:@vandojpn:┗┓†","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/100643230103007331"},{"id":"7qw3bj7kb0","createdAt":"2019-03-28T10:59:44.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"まさらっき、ハト先生、2年間お疲れ様。","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101827922107489261"},{"id":"7qw3cvtkbr","createdAt":"2019-03-28T11:00:47.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"引越し先はこちらです。みんなフォロしてね!\n\nhttps://misskey.xyz/@vando","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101827926245185143"},{"id":"7qxtyp609n","createdAt":"2019-03-29T16:13:21.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"Thank you and Good bye friends.nico for 2 years.\nfriends.nico はみんなの心の中に。","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101834817646842776"},{"id":"7qyuxfswax","createdAt":"2019-03-30T09:28:08.000Z","userId":"7rluu9hv8h","user":{"id":"7rluu9hv8h","name":"(しむ)‮しむしむ","username":"vandojpn","host":"friends.nico","avatarUrl":"https://pdg1.arkjp.net/misskey/drive/98d731b3-ce32-48d4-b348-befd75106224.jpeg","avatarColor":"rgba(118,88,69,0)","isBot":true,"emojis":[]},"text":"二コフレ終了の移住先候補\n\nhttps://misskey.xyz/@vando\n\nhttps://mstdn.jp/@vandojpn\n\n艦これ https://kancolle.social/@vando\n\nTwitter https://twitter.com/vajpn\n\n#theboss_tech \n#クロス\n#friends_nico","cw":null,"visibility":"public","renoteCount":0,"repliesCount":0,"reactions":{},"emojis":[],"fileIds":[],"files":[],"replyId":null,"renoteId":null,"uri":"https://friends.nico/users/vandojpn/statuses/101838886557246239"}],"isFollowing":true,"isFollowed":false,"hasPendingFollowRequestFromYou":false,"hasPendingFollowRequestToYou":false,"isBlocking":false,"isBlocked":false,"isMuted":false}}} - // {"type":"noteUpdated","body":{"id":"7s06kfbynh","type":"reacted","body":{"reaction":"pudding","userId":"7rm8yhnvzd"}}} - - // 通知IDも日時もないイベントを受け取っても通知TLに反映させられないから無視するしかない - // https://github.com/syuilo/misskey/issues/4802 - } + // 特にすることはない + "readAllNotifications", + "readAllUnreadMentions", + "readAllUnreadSpecifiedNotes" -> return + } + + when(type) { + "note" -> { val body = obj.jsonObject("body") fireTimelineItem(parser.status(body), channelId) @@ -245,6 +237,7 @@ internal class StreamReader( log.e("handleMisskeyMessage: notification body is null") return } + log.d("misskey notification: ${parser.accessHost} ${body}") fireTimelineItem(parser.notification(body), channelId) } diff --git a/app/src/main/java/jp/juggler/subwaytooter/api/TootAccountMap.kt b/app/src/main/java/jp/juggler/subwaytooter/api/TootAccountMap.kt index 4efa0a6e..bd803154 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/api/TootAccountMap.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/api/TootAccountMap.kt @@ -4,6 +4,7 @@ import jp.juggler.subwaytooter.api.entity.Acct import jp.juggler.subwaytooter.api.entity.ServiceType import jp.juggler.subwaytooter.api.entity.TootAccount import jp.juggler.subwaytooter.api.entity.TootAccountRef +import jp.juggler.util.notZero import java.util.concurrent.ConcurrentHashMap object TootAccountMap{ @@ -17,9 +18,9 @@ object TootAccountMap{ this.watcher =when(parser.serviceType){ ServiceType.MASTODON -> requireNotNull(parser.accessHost?.ascii) + ServiceType.MISSKEY -> requireNotNull(parser.accessHost?.ascii) ServiceType.TOOTSEARCH -> "?tootsearch" ServiceType.MSP -> "?msp" - ServiceType.MISSKEY -> "?misskey" } } @@ -33,13 +34,11 @@ object TootAccountMap{ } override fun compareTo(other : AccountUniqueKey) : Int { - val i1 = acct.compareTo(other.acct) - if(i1 != 0) return i1 - return watcher.compareTo(other.watcher) + return acct.compareTo(other.acct).notZero() ?: watcher.compareTo(other.watcher) } override fun hashCode() : Int { - val x = 961L + acct.hashCode().toLong() * 31L + watcher.hashCode() + val x = acct.hashCode().toLong() * 31L + watcher.hashCode().toLong() + 961L return (x and 0x7fffffffL).toInt() } } diff --git a/app/src/main/java/jp/juggler/subwaytooter/api/TootParser.kt b/app/src/main/java/jp/juggler/subwaytooter/api/TootParser.kt index 15c6cab0..735705a4 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/api/TootParser.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/api/TootParser.kt @@ -16,7 +16,8 @@ class TootParser( var pinned : Boolean = false, // プロフィールカラムからpinned TL を読んだ時だけ真 var highlightTrie : WordTrieTree? = null, var serviceType : ServiceType = ServiceType.MASTODON, - var misskeyDecodeProfilePin : Boolean = false + var misskeyDecodeProfilePin : Boolean = false, + var fromStream : Boolean = false ) { val misskeyUserRelationMap = HashMap() diff --git a/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootAccount.kt b/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootAccount.kt index b0a978c3..80561546 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootAccount.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootAccount.kt @@ -123,6 +123,7 @@ open class TootAccount(parser : TootParser, src : JsonObject) { init { this.json = src + src.put("_fromStream",parser.fromStream) if(parser.serviceType == ServiceType.MISSKEY) { diff --git a/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootNotification.kt b/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootNotification.kt index d36055dc..3cdeb744 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootNotification.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/api/entity/TootNotification.kt @@ -29,6 +29,9 @@ class TootNotification(parser : TootParser, src : JsonObject) : TimelineItem() { const val TYPE_FOLLOW_REQUEST = "follow_request" const val TYPE_FOLLOW_REQUEST_MISSKEY = "receiveFollowRequest" + const val TYPE_FOLLOW_REQUEST_ACCEPTED_MISSKEY = "followRequestAccepted" + const val TYPE_POLL_VOTE_MISSKEY = "pollVote" + // 投票 const val TYPE_VOTE = "poll_vote" @@ -62,8 +65,15 @@ class TootNotification(parser : TootParser, src : JsonObject) : TimelineItem() { created_at = src.string("createdAt") time_created_at = TootStatus.parseTime(created_at) - accountRef = TootAccountRef.mayNull(parser, parser.account(src.jsonObject("user"))) - status = parser.status(src.jsonObject("note")) + accountRef = TootAccountRef.mayNull( + parser, + parser.account( + src.jsonObject("user") + ) + ) + status = parser.status( + src.jsonObject("note") + ) reaction = src.string("reaction") 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 c400059e..f519843c 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 @@ -195,6 +195,7 @@ class TootStatus(parser : TootParser, src : JsonObject) : TimelineItem() { init { this.json = src this.serviceType = parser.serviceType + src.put("_fromStream",parser.fromStream) if(parser.serviceType == ServiceType.MISSKEY) { val instance = parser.accessHost diff --git a/app/src/main/java/jp/juggler/subwaytooter/table/SavedAccount.kt b/app/src/main/java/jp/juggler/subwaytooter/table/SavedAccount.kt index 39aa405a..c7e81b5e 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/table/SavedAccount.kt +++ b/app/src/main/java/jp/juggler/subwaytooter/table/SavedAccount.kt @@ -973,11 +973,14 @@ class SavedAccount( TootNotification.TYPE_UNFOLLOW -> notification_follow TootNotification.TYPE_FOLLOW_REQUEST, - TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY -> notification_follow_request + TootNotification.TYPE_FOLLOW_REQUEST_MISSKEY, + TootNotification.TYPE_FOLLOW_REQUEST_ACCEPTED_MISSKEY -> notification_follow_request TootNotification.TYPE_REACTION -> notification_reaction - TootNotification.TYPE_VOTE, TootNotification.TYPE_POLL -> notification_vote + TootNotification.TYPE_VOTE, + TootNotification.TYPE_POLL, + TootNotification.TYPE_POLL_VOTE_MISSKEY -> notification_vote else -> false } diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 6011c2dd..ee01c840 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -203,6 +203,7 @@ %1$sがブーストしました %1$sがお気に入りに追加しました %1$sがフォローリクエストを申請しました + %1$sがあなたのフォローリクエストを承認しました %1$sにフォローされました %1$sが引用しました %1$sがリアクション @@ -352,7 +353,7 @@ 全ての画像を隠す フリックで削除。登録内容を反映するにはカラムのリロードが必要です 強調表示する単語 - ホーム + ホーム 提案を無視 画像 画像の不透明度 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a8733747..2ed988f1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -88,6 +88,7 @@ %1$s mentioned %1$s voted %1$s sent follow request + %1$s accepted your follow request %1$s quoted %1$s reactioned %1$s is following you