remove redunted copy to clipboard message (#7578)

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Harshal sanghvi 2023-10-05 15:59:44 +05:30 committed by GitHub
parent cd73f87bb8
commit f7d2bf1cac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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';
@ -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 (