mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-21 16:44:37 +03:00
Merge branch 'hotfix/1.3.7-oom' into main
This commit is contained in:
commit
8b98c8fe1d
1 changed files with 6 additions and 3 deletions
|
@ -41,6 +41,7 @@ class ShortcutsHandler @Inject constructor(
|
|||
private val pinCodeStore: PinCodeStore
|
||||
) : PinCodeStoreListener {
|
||||
private val isRequestPinShortcutSupported = ShortcutManagerCompat.isRequestPinShortcutSupported(context)
|
||||
private val maxShortcutCountPerActivity = ShortcutManagerCompat.getMaxShortcutCountPerActivity(context)
|
||||
|
||||
// Value will be set correctly if necessary
|
||||
private var hasPinCode = true
|
||||
|
@ -93,7 +94,9 @@ class ShortcutsHandler @Inject constructor(
|
|||
// No shortcut in this case (privacy)
|
||||
ShortcutManagerCompat.removeAllDynamicShortcuts(context)
|
||||
} else {
|
||||
val shortcuts = rooms.mapIndexed { index, room ->
|
||||
val shortcuts = rooms
|
||||
.take(maxShortcutCountPerActivity)
|
||||
.mapIndexed { index, room ->
|
||||
shortcutCreator.create(room, index)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue