From 944a896586f2899663267d8441ace8bfc5911f5d Mon Sep 17 00:00:00 2001
From: Lim Chee Aun <cheeaun@gmail.com>
Date: Mon, 24 Apr 2023 19:16:07 +0800
Subject: [PATCH] Risky bump of use-long-press and to 1s delay

---
 package-lock.json         | 18 +++++++-----------
 package.json              |  2 +-
 src/components/menu.jsx   |  1 +
 src/components/status.jsx |  3 ++-
 4 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 871f0dfe..9835fbf4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -33,7 +33,7 @@
         "toastify-js": "~1.12.0",
         "uid": "~2.0.2",
         "use-debounce": "~9.0.3",
-        "use-long-press": "~2.0.3",
+        "use-long-press": "~3.0.4",
         "use-resize-observer": "~9.1.0",
         "valtio": "1.9.0"
       },
@@ -6730,13 +6730,9 @@
       }
     },
     "node_modules/use-long-press": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/use-long-press/-/use-long-press-2.0.3.tgz",
-      "integrity": "sha512-n3cfv90Y1ldNt+hhXzxnxuLZmgLOOC/+qfLGoeEBgOxmnokPPt39MPF3KmvKriq5VMoJ7uQdVjHejCdHBt9anw==",
-      "engines": {
-        "node": ">=10",
-        "npm": ">=5"
-      },
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/use-long-press/-/use-long-press-3.0.4.tgz",
+      "integrity": "sha512-+/qkbuRjsrzi30aSIE6lrq0+7TSGKUg6drbk/jSNqJqeWWRIjj5/XQoA9YzQC+IVVwkmcknK8MLi/HtAfNFvPA==",
       "peerDependencies": {
         "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
       }
@@ -11861,9 +11857,9 @@
       "requires": {}
     },
     "use-long-press": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/use-long-press/-/use-long-press-2.0.3.tgz",
-      "integrity": "sha512-n3cfv90Y1ldNt+hhXzxnxuLZmgLOOC/+qfLGoeEBgOxmnokPPt39MPF3KmvKriq5VMoJ7uQdVjHejCdHBt9anw==",
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/use-long-press/-/use-long-press-3.0.4.tgz",
+      "integrity": "sha512-+/qkbuRjsrzi30aSIE6lrq0+7TSGKUg6drbk/jSNqJqeWWRIjj5/XQoA9YzQC+IVVwkmcknK8MLi/HtAfNFvPA==",
       "requires": {}
     },
     "use-resize-observer": {
diff --git a/package.json b/package.json
index aa880ea2..fead2556 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,7 @@
     "toastify-js": "~1.12.0",
     "uid": "~2.0.2",
     "use-debounce": "~9.0.3",
-    "use-long-press": "~2.0.3",
+    "use-long-press": "~3.0.4",
     "use-resize-observer": "~9.1.0",
     "valtio": "1.9.0"
   },
diff --git a/src/components/menu.jsx b/src/components/menu.jsx
index 22da8fa7..1e9bcec0 100644
--- a/src/components/menu.jsx
+++ b/src/components/menu.jsx
@@ -33,6 +33,7 @@ function NavMenu(props) {
       states.showAccounts = true;
     },
     {
+      threshold: 1000,
       detect: 'touch',
       cancelOnMovement: true,
     },
diff --git a/src/components/status.jsx b/src/components/status.jsx
index 5a784102..4b0239e6 100644
--- a/src/components/status.jsx
+++ b/src/components/status.jsx
@@ -673,7 +673,7 @@ function Status({
       setIsContextMenuOpen(true);
     },
     {
-      threshold: 500,
+      threshold: 1000,
       captureEvent: true,
       detect: 'touch',
       cancelOnMovement: true,
@@ -1836,6 +1836,7 @@ function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
       setShowPeek(true);
     },
     {
+      threshold: 1000,
       captureEvent: true,
       detect: 'touch',
       cancelOnMovement: true,