diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/app/passwordstore/util/shortcuts/ShortcutHandler.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/app/passwordstore/util/shortcuts/ShortcutHandler.kt b/app/src/main/java/app/passwordstore/util/shortcuts/ShortcutHandler.kt index b7e6549a..9248ba55 100644 --- a/app/src/main/java/app/passwordstore/util/shortcuts/ShortcutHandler.kt +++ b/app/src/main/java/app/passwordstore/util/shortcuts/ShortcutHandler.kt @@ -41,7 +41,9 @@ class ShortcutHandler @Inject constructor(@ApplicationContext val context: Conte val shortcuts = shortcutManager.dynamicShortcuts // If we're above or equal to the maximum shortcuts allowed, drop the last item. if (shortcuts.size >= MAX_SHORTCUT_COUNT) { - shortcuts.removeLast() + // We'd just do List.removeLast but the Kotlin stdlib extension gets shadowed by the API 35 + // JDK implementation + shortcuts.removeAt(shortcuts.lastIndex) } // Reverse the list so we can append our new shortcut at the 'end'. shortcuts.reverse() |