From e9024312a77dec7eabfc57beed9805847441150b Mon Sep 17 00:00:00 2001 From: Cutls Date: Thu, 9 May 2019 00:31:05 +0900 Subject: [PATCH] Fix: some Misskey bugs about reaction --- app/js/post/misskeystatus.js | 22 ++++----- app/js/tl/misskeyparse.js | 82 +++++++++++++++++++-------------- app/package.json | 6 +-- app/view/en/index.html | 16 ++----- app/view/ja/index.html | 16 ++----- app/view/make/index.sample.html | 6 ++- app/view/make/make.js | 2 +- app/view/ps/index.html | 16 ++----- 8 files changed, 82 insertions(+), 84 deletions(-) diff --git a/app/js/post/misskeystatus.js b/app/js/post/misskeystatus.js index ef78f07f..f03ce09b 100644 --- a/app/js/post/misskeystatus.js +++ b/app/js/post/misskeystatus.js @@ -64,11 +64,11 @@ function reactiontoggle(id,acct_id,tlid){ if (httpreq.readyState === 4) { var json = httpreq.response; console.log(json); - if(json.reactionCounts){ - var reactions=["like","love","laugh","hmm","surprise","congrats","angry","confused","pudding","star"]; + if(json.reactions){ + var reactions=["like","love","laugh","hmm","surprise","congrats","angry","confused","pudding","rip"]; for(var i=0;i' + twemoji.parse("💢") + '' + angry + '' + twemoji.parse("😥") + '' + confused + - '' + twemoji.parse("🍮") + '' + pudding + + '' + twemoji.parse("😇") + '' + rip + '' + addReact + 'add_box' + poll + mentions + tags + '' + @@ -870,6 +869,11 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) { var datetype = localStorage.getItem("datetype"); Object.keys(obj).forEach(function (key) { var toot = obj[key]; + if(toot.followee){ + toot=toot.followee + }else if(toot.follower){ + toot=toot.follower + } var locked = ""; if (auth) { var auth = '
' + notftext + @@ -940,8 +954,8 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) { '
' + '' + '
Follows:' + - toot.followingCount + - '
Followers:' + toot.followersCount + + fingct + + '
Followers:' + ferct + '
' + '
' + '' + diff --git a/app/package.json b/app/package.json index 9786ab22..52b9dedc 100644 --- a/app/package.json +++ b/app/package.json @@ -99,12 +99,12 @@ ] }, "electronDownload": { - "version": "4.1.4" + "version": "4.2.0" }, - "electronVersion": "4.1.4" + "electronVersion": "4.2.0" }, "devDependencies": { - "electron": "^4.1.4", + "electron": "^4.2.0", "electron-builder": "^20.39.0" } } diff --git a/app/view/en/index.html b/app/view/en/index.html index 489295aa..d1cfdf25 100644 --- a/app/view/en/index.html +++ b/app/view/en/index.html @@ -36,7 +36,7 @@