summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/get-user-menu.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/scripts/get-user-menu.ts')
-rw-r--r--packages/frontend/src/scripts/get-user-menu.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts
index 24ca93495a..ab3f11d4db 100644
--- a/packages/frontend/src/scripts/get-user-menu.ts
+++ b/packages/frontend/src/scripts/get-user-menu.ts
@@ -80,6 +80,15 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router
});
}
+ async function toggleWithReplies() {
+ os.apiWithDialog('following/update', {
+ userId: user.id,
+ withReplies: !user.withReplies,
+ }).then(() => {
+ user.withReplies = !user.withReplies;
+ });
+ }
+
async function toggleNotify() {
os.apiWithDialog('following/update', {
userId: user.id,
@@ -282,6 +291,10 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router
// フォローしたとしても user.isFollowing はリアルタイム更新されないので不便なため
//if (user.isFollowing) {
menu = menu.concat([{
+ icon: user.withReplies ? 'ph-envelope-open ph-bold pg-lg' : 'ph-envelope ph-bold pg-lg-off',
+ text: user.withReplies ? i18n.ts.hideRepliesToOthersInTimeline : i18n.ts.showRepliesToOthersInTimeline,
+ action: toggleWithReplies,
+ }, {
icon: user.notify === 'none' ? 'ph-bell ph-bold pg-lg' : 'ph-bell ph-bold pg-lg-off',
text: user.notify === 'none' ? i18n.ts.notifyNotes : i18n.ts.unnotifyNotes,
action: toggleNotify,