about summary refs log tree commit diff
path: root/src/view/screens/Settings.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-04-12 18:26:38 -0700
committerGitHub <noreply@github.com>2023-04-12 18:26:38 -0700
commit2fed6c402159c6084dd481ab87c5e8b034e910ac (patch)
tree5907b2b67c900ef78de89e12ad9ae4c0d5ef6715 /src/view/screens/Settings.tsx
parenta20d034ba5b18c4512f3a36f733bb5cd2199424e (diff)
downloadvoidsky-2fed6c402159c6084dd481ab87c5e8b034e910ac.tar.zst
Add first round of labeling tools (#467)
* Rework notifications to sync locally in full and give users better control

* Fix positioning of load more btn on web

* Improve behavior of load more notifications btn

* Fix to post rendering

* Fix notification fetch abort condition

* Add start of post-hiding by labels

* Create a standard postcontainer and improve show/hide UI on posts

* Add content hiding to expanded post form

* Improve label rendering to give more context to users when appropriate

* Fix rendering bug

* Add user/profile labeling

* Implement content filtering preferences

* Filter notifications by content prefs

* Update test-pds config

* Bump deps
Diffstat (limited to 'src/view/screens/Settings.tsx')
-rw-r--r--src/view/screens/Settings.tsx19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx
index d429db1b6..081be8dca 100644
--- a/src/view/screens/Settings.tsx
+++ b/src/view/screens/Settings.tsx
@@ -124,6 +124,11 @@ export const SettingsScreen = withAuthRequired(
       store.shell.openModal({name: 'invite-codes'})
     }, [track, store])
 
+    const onPressContentFiltering = React.useCallback(() => {
+      track('Settings:ContentfilteringButtonClicked')
+      store.shell.openModal({name: 'content-filtering-settings'})
+    }, [track, store])
+
     const onPressSignout = React.useCallback(() => {
       track('Settings:SignOutButtonClicked')
       store.session.logout()
@@ -249,6 +254,20 @@ export const SettingsScreen = withAuthRequired(
             Advanced
           </Text>
           <TouchableOpacity
+            testID="contentFilteringBtn"
+            style={[styles.linkCard, pal.view, isSwitching && styles.dimmed]}
+            onPress={isSwitching ? undefined : onPressContentFiltering}>
+            <View style={[styles.iconContainer, pal.btn]}>
+              <FontAwesomeIcon
+                icon="eye"
+                style={pal.text as FontAwesomeIconStyle}
+              />
+            </View>
+            <Text type="lg" style={pal.text}>
+              Content moderation
+            </Text>
+          </TouchableOpacity>
+          <TouchableOpacity
             testID="changeHandleBtn"
             style={[styles.linkCard, pal.view, isSwitching && styles.dimmed]}
             onPress={isSwitching ? undefined : onPressChangeHandle}>