From 277b451ce0df8aee7fce76648823314e13edc902 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 24 Apr 2021 18:19:48 -0400 Subject: [PATCH] Add show read posts option. Fixes #276 --- lemmy-translations | 2 +- package.json | 2 +- src/shared/components/person.tsx | 21 +++++++++++++++++++++ yarn.lock | 8 ++++---- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/lemmy-translations b/lemmy-translations index 0cf2ad8..5fa4929 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit 0cf2ad832d07d6c0232b3c9c1958d5572303410e +Subproject commit 5fa4929d6660588c290dfb78f2cb001974e163a2 diff --git a/package.json b/package.json index 25ce700..0c5d49b 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "eslint-plugin-prettier": "^3.3.1", "husky": "^6.0.0", "iso-639-1": "^2.1.9", - "lemmy-js-client": "0.11.0-rc.12", + "lemmy-js-client": "0.11.0-rc.13", "lint-staged": "^10.5.4", "mini-css-extract-plugin": "^1.4.1", "node-fetch": "^2.6.1", diff --git a/src/shared/components/person.tsx b/src/shared/components/person.tsx index c0ef9f0..53de754 100644 --- a/src/shared/components/person.tsx +++ b/src/shared/components/person.tsx @@ -824,6 +824,20 @@ export class Person extends Component { +
+
+ + +
+
{ i.setState(i.state); } + handleUserSettingsShowReadPosts(i: Person, event: any) { + i.state.saveUserSettingsForm.show_read_posts = event.target.checked; + i.setState(i.state); + } + handleUserSettingsShowScoresChange(i: Person, event: any) { i.state.saveUserSettingsForm.show_scores = event.target.checked; UserService.Instance.localUserView.local_user.show_scores = @@ -1191,6 +1210,8 @@ export class Person extends Component { UserService.Instance.localUserView.local_user.show_bot_accounts; this.state.saveUserSettingsForm.show_scores = UserService.Instance.localUserView.local_user.show_scores; + this.state.saveUserSettingsForm.show_read_posts = + UserService.Instance.localUserView.local_user.show_read_posts; this.state.saveUserSettingsForm.email = UserService.Instance.localUserView.local_user.email; this.state.saveUserSettingsForm.bio = diff --git a/yarn.lock b/yarn.lock index 1fed995..e46b107 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5125,10 +5125,10 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -lemmy-js-client@0.11.0-rc.12: - version "0.11.0-rc.12" - resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.11.0-rc.12.tgz#b6f80f69425ae9699857f98640a3d5a9697955b1" - integrity sha512-tAYL6g+OgJcNy4SP0tbN6x/qyScAV5XPVyIYGGZd2FDfVd3VFDvfoesqGBOSryLhW9jDE6YSC09jhNLMyNtMCA== +lemmy-js-client@0.11.0-rc.13: + version "0.11.0-rc.13" + resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.11.0-rc.13.tgz#ba59315052b6f67ea034cdee400435ace277d503" + integrity sha512-Nh57Euywhq5p4Y/KX1j8yOVNyXwhZLqUlqMk+96R9qQHgiy3xXhUBztXOk1PTE5HvjBPw8FuWyQPxTphIb/vQg== levn@^0.4.1: version "0.4.1" -- 2.44.1