qr code modal

This commit is contained in:
2025-10-03 15:27:47 +02:00
parent 2b6bf7e433
commit 6a6c3ddb8b
+2 -12
View File
@@ -45,7 +45,6 @@ const ShareModal = ({ payload }) => {
const [copied, setCopied] = useState(false); const [copied, setCopied] = useState(false);
const copyTimeout = useRef(null); const copyTimeout = useRef(null);
const qrOpenTimeout = useRef(null);
const blurProps = const blurProps =
Platform.OS === "android" Platform.OS === "android"
? { experimentalBlurMethod: "dimezisBlurView" } ? { experimentalBlurMethod: "dimezisBlurView" }
@@ -70,9 +69,6 @@ const ShareModal = ({ payload }) => {
if (copyTimeout.current) { if (copyTimeout.current) {
clearTimeout(copyTimeout.current); clearTimeout(copyTimeout.current);
} }
if (qrOpenTimeout.current) {
clearTimeout(qrOpenTimeout.current);
}
}; };
}, []); }, []);
@@ -136,20 +132,14 @@ const ShareModal = ({ payload }) => {
const handleShareOption = useCallback( const handleShareOption = useCallback(
async (option) => { async (option) => {
if (option?.type === "qr") { if (option?.type === "qr") {
const qrTitleValue = qrTitle; await closeSheet();
const hidePromise = closeSheet();
qrOpenTimeout.current = setTimeout(() => {
setGlobal({ setGlobal({
shareQrModal: { shareQrModal: {
visible: true, visible: true,
url: qrUrl, url: qrUrl,
title: qrTitleValue, title: qrTitle,
}, },
}); });
}, 200);
await hidePromise;
return; return;
} }