diff options
author | Foysal Ahamed <foysal@blueskyweb.xyz> | 2023-08-15 23:32:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-15 14:32:06 -0700 |
commit | abbc6543f423efdcd26f44666d9847ecd70779dc (patch) | |
tree | 4324068713cc947f9e28b081bd45fec587ef33ef /src/view/screens/ProfileList.tsx | |
parent | a5762c2d7df89bcb89588e2ab8969ea1e8945514 (diff) | |
download | voidsky-abbc6543f423efdcd26f44666d9847ecd70779dc.tar.zst |
:sparkles: Repurpose report post modal and re-use for list reporting (#1070)
* :sparkles: Repupose report post modal and re-use for list reporting * :sparkles: Allow reporting a feed generator * :sparkles: :recycle: Refactor report modal into one shared component for reporting different collections * :white_check_mark: Adjust report option selector in tests * :white_check_mark: Add test for list reporting * :recycle: :sparkles: Refactor reason options and add options for list and feedgen * :broom: Cleanup remaining todo * Fix to mutelist react keys * Fix regression from rebase * Improve customfeed mobile header --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/view/screens/ProfileList.tsx')
-rw-r--r-- | src/view/screens/ProfileList.tsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index 0502e8dc8..651fac21f 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -86,6 +86,15 @@ export const ProfileListScreen = withAuthRequired( }) }, [store, list, navigation]) + const onPressReportList = React.useCallback(() => { + if (!list.list) return + store.shell.openModal({ + name: 'report', + uri: list.uri, + cid: list.list.cid, + }) + }, [store, list]) + const onPressShareList = React.useCallback(() => { const url = toShareUrl(`/profile/${name}/lists/${rkey}`) shareUrl(url) @@ -104,6 +113,7 @@ export const ProfileListScreen = withAuthRequired( onPressEditList={onPressEditList} onToggleSubscribed={onToggleSubscribed} onPressShareList={onPressShareList} + onPressReportList={onPressReportList} reversed={true} /> ) @@ -114,6 +124,7 @@ export const ProfileListScreen = withAuthRequired( onPressEditList, onPressShareList, onToggleSubscribed, + onPressReportList, ]) return ( @@ -132,6 +143,7 @@ export const ProfileListScreen = withAuthRequired( onToggleSubscribed={onToggleSubscribed} onPressEditList={onPressEditList} onPressDeleteList={onPressDeleteList} + onPressReportList={onPressReportList} onPressShareList={onPressShareList} style={[s.flex1]} /> |