From fee3c97e1fda735d402bf53f486ed6b4470b63dd Mon Sep 17 00:00:00 2001 From: janderedev Date: Fri, 6 Aug 2021 14:59:34 +0200 Subject: [PATCH 1/2] Update revolt.js, fixes #1 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 82f59078..b3b8f789 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "react-scroll": "^1.8.2", "redux": "^4.1.0", "revolt-api": "0.5.1-alpha.10-patch.0", - "revolt.js": "5.0.0-alpha.18", + "revolt.js": "5.0.0-alpha.18-patch.0", "rimraf": "^3.0.2", "sass": "^1.35.1", "shade-blend-color": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 1db879d7..0c6cf548 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3572,10 +3572,10 @@ revolt-api@0.5.1-alpha.10-patch.0: resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.1-alpha.10-patch.0.tgz#97d31bec7dfa4573567097443acb059c4feaac20" integrity sha512-UyM890HkGlYNQOxpHuEpUsJHLt8Ujnjg9/zPEDGpbvS4iy0jmHX23Hh8tOCfb/ewxbNrtT3G1HpSWKOneW/vYg== -revolt.js@5.0.0-alpha.18: - version "5.0.0-alpha.18" - resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.0.0-alpha.18.tgz#fffd63a4f4f93a4a6422de6a68c1ba3f3f9b55e5" - integrity sha512-NVd00P4CYLVJf1AuYwo65mPeLaST/RdU7dMLFwCZPvQAHvyPwTfLekCc9dfKPT4BkS2sjF8Vxi2xUFpMRMZYfw== +revolt.js@5.0.0-alpha.18-patch.0: + version "5.0.0-alpha.18-patch.0" + resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.0.0-alpha.18-patch.0.tgz#38ac237bac9f4b935a456bc276eaed2d471b6023" + integrity sha512-D4M3cYbF/MRDd3rVcWJ9DSQctecRnc/0QltFjgr9XhkFHkVkCn32CDUnklMgQdh1uE8C8t7jaJsCV5DdalxUXg== dependencies: axios "^0.19.2" eventemitter3 "^4.0.7" From 1e25821816743b117350faa7cfe44071ab480f58 Mon Sep 17 00:00:00 2001 From: janderedev Date: Fri, 6 Aug 2021 15:40:32 +0200 Subject: [PATCH 2/2] Esc now removes the last reply, fixes #7 --- src/components/common/messaging/MessageBox.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/common/messaging/MessageBox.tsx b/src/components/common/messaging/MessageBox.tsx index 824ecd55..66a87bca 100644 --- a/src/components/common/messaging/MessageBox.tsx +++ b/src/components/common/messaging/MessageBox.tsx @@ -477,6 +477,10 @@ export default observer(({ channel }: Props) => { return send(); } + if (e.key === "Escape" && replies.length > 0) { + setReplies(replies.slice(0, -1)); + } + debouncedStopTyping(true); }} placeholder={