about summary refs log tree commit diff
path: root/src/view/com/util/PostMuted.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/com/util/PostMuted.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/com/util/PostMuted.tsx')
-rw-r--r--src/view/com/util/PostMuted.tsx50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/view/com/util/PostMuted.tsx b/src/view/com/util/PostMuted.tsx
deleted file mode 100644
index 539a71ecf..000000000
--- a/src/view/com/util/PostMuted.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import React from 'react'
-import {StyleSheet, TouchableOpacity, View} from 'react-native'
-import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
-import {usePalette} from 'lib/hooks/usePalette'
-import {Text} from './text/Text'
-
-export function PostMutedWrapper({
-  isMuted,
-  children,
-}: React.PropsWithChildren<{isMuted?: boolean}>) {
-  const pal = usePalette('default')
-  const [override, setOverride] = React.useState(false)
-  if (!isMuted || override) {
-    return <>{children}</>
-  }
-  return (
-    <View style={[styles.container, pal.view, pal.border]}>
-      <FontAwesomeIcon
-        icon={['far', 'eye-slash']}
-        style={[styles.icon, pal.text]}
-      />
-      <Text type="md" style={pal.textLight}>
-        Post from an account you muted.
-      </Text>
-      <TouchableOpacity
-        style={styles.showBtn}
-        onPress={() => setOverride(true)}>
-        <Text type="md" style={pal.link}>
-          Show post
-        </Text>
-      </TouchableOpacity>
-    </View>
-  )
-}
-
-const styles = StyleSheet.create({
-  container: {
-    flexDirection: 'row',
-    alignItems: 'center',
-    paddingVertical: 14,
-    paddingHorizontal: 18,
-    borderTopWidth: 1,
-  },
-  icon: {
-    marginRight: 10,
-  },
-  showBtn: {
-    marginLeft: 'auto',
-  },
-})