remove redunted copy to clipboard message (#7578)
Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
parent
cd73f87bb8
commit
f7d2bf1cac
1 changed files with 4 additions and 1 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Reference in a new issue