aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2024-08-08 02:46:08 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2024-08-08 03:34:14 +0530
commite8cdc2077f295cf61ed7157f8ae2cdbb53c39054 (patch)
treeefc3d7b56d13c9962d4b32bba5375b1d00cc87e5 /app/src/main
parent4eb8f497d598c731a3628c7ae71a398ac462cfc0 (diff)
fix(build): compile against SDK 35
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/app/passwordstore/util/shortcuts/ShortcutHandler.kt4
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()