From e8cdc2077f295cf61ed7157f8ae2cdbb53c39054 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 8 Aug 2024 02:46:08 +0530 Subject: fix(build): compile against SDK 35 --- app/src/main/java/app/passwordstore/util/shortcuts/ShortcutHandler.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/src/main') 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() -- cgit v1.2.3