]> Untitled Git - lemmy-ui.git/commitdiff
Add show read posts option. Fixes #276
authorDessalines <tyhou13@gmx.com>
Sat, 24 Apr 2021 22:19:48 +0000 (18:19 -0400)
committerDessalines <tyhou13@gmx.com>
Sat, 24 Apr 2021 22:19:48 +0000 (18:19 -0400)
lemmy-translations
package.json
src/shared/components/person.tsx
yarn.lock

index 0cf2ad832d07d6c0232b3c9c1958d5572303410e..5fa4929d6660588c290dfb78f2cb001974e163a2 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0cf2ad832d07d6c0232b3c9c1958d5572303410e
+Subproject commit 5fa4929d6660588c290dfb78f2cb001974e163a2
index 25ce700ad614d9e1a8d6d62033743844e5cd94f7..0c5d49bc9b0444be0793ded962cbfea2ddbfee0c 100644 (file)
@@ -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",
index c0ef9f0da1e747dc40ec744d5f1289981343c3c1..53de7543e4e03b5b045fb2707559d87773a9b43d 100644 (file)
@@ -824,6 +824,20 @@ export class Person extends Component<any, PersonState> {
               </label>
             </div>
           </div>
+          <div class="form-group">
+            <div class="form-check">
+              <input
+                class="form-check-input"
+                id="user-show-read-posts"
+                type="checkbox"
+                checked={this.state.saveUserSettingsForm.show_read_posts}
+                onChange={linkEvent(this, this.handleUserSettingsShowReadPosts)}
+              />
+              <label class="form-check-label" htmlFor="user-show-read-posts">
+                {i18n.t("show_read_posts")}
+              </label>
+            </div>
+          </div>
           <div class="form-group">
             <div class="form-check">
               <input
@@ -1007,6 +1021,11 @@ export class Person extends Component<any, PersonState> {
     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<any, PersonState> {
         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 =
index 1fed995c8615c2ee1975a62cf37dfdf0e844a8f7..e46b107b6f72d8f3b1eced7d12571ff2263a1ace 100644 (file)
--- 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"