Skip to content

Commit

Permalink
remove redunted copy to clipboard message
Browse files Browse the repository at this point in the history
  • Loading branch information
harshal2030 committed Oct 3, 2023
1 parent 6a73251 commit 9c7048f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/screens/post_options/options/copy_text_option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import Clipboard from '@react-native-clipboard/clipboard';
import React, {useCallback} from 'react';
import {Platform} from 'react-native';

import {BaseOption} from '@components/common_post_options';
import {SNACK_BAR_TYPE} from '@constants/snack_bar';
Expand All @@ -21,7 +22,9 @@ const CopyTextOption = ({bottomSheetId, postMessage, sourceScreen}: Props) => {
const handleCopyText = useCallback(async () => {
Clipboard.setString(postMessage);
await dismissBottomSheet(bottomSheetId);
showSnackBar({barType: SNACK_BAR_TYPE.MESSAGE_COPIED, sourceScreen});
if ((Platform.OS === 'android' && Platform.Version < 33) || Platform.OS === 'ios') {
showSnackBar({barType: SNACK_BAR_TYPE.MESSAGE_COPIED, sourceScreen});
}
}, [postMessage]);

return (
Expand Down

0 comments on commit 9c7048f

Please sign in to comment.