From a894ffb80f046d39879191873dbccb8b854842e2 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sat, 28 Jan 2023 11:45:58 +0100 Subject: [PATCH 1/2] Make the "open" keyboard shortcut work faster Previously when pressing the `O` key on article list, the handler for that keypress first simulated a click on that event in order to mark it as read, and only then opened the website that item links to in another tab. When having a lot of items on screen this caused a huge delay between pressing `O` and opening the linked article in a new tab. The delay was sometimes 5, even 10 whole seconds. This simple fix makes it so the article opens first, and then the click simulation happens afterwards. Signed-off-by: Kuba Orlik Signed-off-by: Benjamin Brahmer --- js/gui/KeyboardShortcuts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/gui/KeyboardShortcuts.js b/js/gui/KeyboardShortcuts.js index 9ddcb582df..3cb174e005 100644 --- a/js/gui/KeyboardShortcuts.js +++ b/js/gui/KeyboardShortcuts.js @@ -259,10 +259,10 @@ var openLink = function () { onActiveItem(function (item) { - item.trigger('click'); // mark read var url = item.find('.external:visible').attr('href'); var newWindow = window.open(url, '_blank'); newWindow.opener = null; + setTimeout(()=>item.trigger('click'), 0); // mark read }); }; From bfba5cb7f5b4b627788ec5ff120984f3aae32848 Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Sun, 29 Jan 2023 19:08:50 +0100 Subject: [PATCH 2/2] add changelog entry Signed-off-by: Benjamin Brahmer --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a6589443b..8748a61cc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ The format is mostly based on [Keep a Changelog](https://keepachangelog.com/en/1 # Unreleased ## [21.x.x] ### Changed -- Drop support for Nextcloud 23 +- Drop support for Nextcloud 23 (#2077 ) +- Make the "open" keyboard shortcut work faster (#2080) ### Fixed