Remove long-press-event, not really working

This commit is contained in:
Lim Chee Aun 2023-03-02 17:58:57 +08:00
parent a78417ac60
commit 4d59e5a804
3 changed files with 0 additions and 27 deletions

11
package-lock.json generated
View file

@ -18,7 +18,6 @@
"fast-deep-equal": "~3.1.3", "fast-deep-equal": "~3.1.3",
"idb-keyval": "~6.2.0", "idb-keyval": "~6.2.0",
"just-debounce-it": "~3.2.0", "just-debounce-it": "~3.2.0",
"long-press-event": "~2.4.6",
"masto": "~5.10.0", "masto": "~5.10.0",
"mem": "~9.0.2", "mem": "~9.0.2",
"p-retry": "~5.1.2", "p-retry": "~5.1.2",
@ -4665,11 +4664,6 @@
"integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==",
"dev": true "dev": true
}, },
"node_modules/long-press-event": {
"version": "2.4.6",
"resolved": "https://registry.npmjs.org/long-press-event/-/long-press-event-2.4.6.tgz",
"integrity": "sha512-59zL3M+uD7Q2DTuxJ2UkbVV3+0D9PrcI7zgem1AXRinH6g8mb7iN9vOKCqiVriW15S4L9OmKOr/d8q9qAaeCGQ=="
},
"node_modules/loose-envify": { "node_modules/loose-envify": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@ -10341,11 +10335,6 @@
"integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==",
"dev": true "dev": true
}, },
"long-press-event": {
"version": "2.4.6",
"resolved": "https://registry.npmjs.org/long-press-event/-/long-press-event-2.4.6.tgz",
"integrity": "sha512-59zL3M+uD7Q2DTuxJ2UkbVV3+0D9PrcI7zgem1AXRinH6g8mb7iN9vOKCqiVriW15S4L9OmKOr/d8q9qAaeCGQ=="
},
"loose-envify": { "loose-envify": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",

View file

@ -20,7 +20,6 @@
"fast-deep-equal": "~3.1.3", "fast-deep-equal": "~3.1.3",
"idb-keyval": "~6.2.0", "idb-keyval": "~6.2.0",
"just-debounce-it": "~3.2.0", "just-debounce-it": "~3.2.0",
"long-press-event": "~2.4.6",
"masto": "~5.10.0", "masto": "~5.10.0",
"mem": "~9.0.2", "mem": "~9.0.2",
"p-retry": "~5.1.2", "p-retry": "~5.1.2",

View file

@ -7,7 +7,6 @@ import {
MenuHeader, MenuHeader,
MenuItem, MenuItem,
} from '@szhsin/react-menu'; } from '@szhsin/react-menu';
import 'long-press-event';
import mem from 'mem'; import mem from 'mem';
import pThrottle from 'p-throttle'; import pThrottle from 'p-throttle';
import { memo } from 'preact/compat'; import { memo } from 'preact/compat';
@ -491,20 +490,6 @@ function Status({
x: 0, x: 0,
y: 0, y: 0,
}); });
useEffect(() => {
function openContextMenu(e) {
e.preventDefault();
setContextMenuAnchorPoint({
x: e.clientX,
y: e.clientY,
});
setIsContextMenuOpen(true);
}
statusRef.current?.addEventListener?.('long-press', openContextMenu);
return () => {
statusRef.current?.removeEventListener?.('long-press', openContextMenu);
};
}, []);
return ( return (
<article <article