diff --git a/src/components/context-menu.js b/src/components/context-menu.js index 6f9a4cb..22418f2 100644 --- a/src/components/context-menu.js +++ b/src/components/context-menu.js @@ -37,7 +37,7 @@ const ContextMenuJsx = (props) => { + color = { props.colour ? props.colour : "#666" } /> { props.children } diff --git a/src/components/pages/profile.js b/src/components/pages/profile.js index de2a0e4..13e9c12 100644 --- a/src/components/pages/profile.js +++ b/src/components/pages/profile.js @@ -21,7 +21,8 @@ import { ScreenWithBackBarJsx, } from "src/components/navigation/navigators"; -import ModerateMenuJsx from "src/components/moderate-menu.js"; +import { MenuOption } from "react-native-popup-menu"; +import ContextMenuJsx from "src/components/context-menu.js"; function getMutuals(yourFollowing, theirFollowers) { // Where yours and theirs are arrays of followers, as returned by the API @@ -125,6 +126,39 @@ const ViewProfileJsx = ({navigation}) => { }); }; + const _handleHide = async () => { + await requests.muteAccount( + state.instance, + state.profile.id, + state.accessToken, + + // Thus, only "mute" statuses + { notifications: false, } + ); + + navigation.goBack(); + }; + + const _handleMute = async () => { + await requests.muteAccount( + state.instance, + state.profile.id, + state.accessToken, + ); + + navigation.goBack(); + }; + + const _handleBlock = async () => { + await requests.blockAccount( + state.instance, + state.profile.id, + state.accessToken, + ); + + navigation.goBack(); + }; + return ( <> { state.loaded @@ -134,6 +168,9 @@ const ViewProfileJsx = ({navigation}) => { { style = { styles.profileHeaderIcon } /> - : + : + + + + }