Skip to content

Commit 9b76ed4

Browse files
committed
show max 5 action and constraint shortcuts
1 parent b7a3b1c commit 9b76ed4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/io/github/sds100/keymapper/mappings/keymaps/ConfigKeyMapUseCase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class ConfigKeyMapUseCaseController(
8787
override val recentlyUsedActions: StateFlow<List<ActionData>> =
8888
preferenceRepository.get(Keys.recentlyUsedActions)
8989
.map(::getActionShortcuts)
90-
.map { it }
90+
.map { it.take(5) }
9191
.stateIn(
9292
coroutineScope,
9393
SharingStarted.WhileSubscribed(stopTimeoutMillis = 5000),
@@ -106,7 +106,7 @@ class ConfigKeyMapUseCaseController(
106106
// Do not include constraints that the key map already contains.
107107
shortcuts
108108
.filter { !keyMap.data.constraintState.constraints.contains(it) }
109-
.take(3)
109+
.take(5)
110110
}.stateIn(
111111
coroutineScope,
112112
SharingStarted.WhileSubscribed(stopTimeoutMillis = 5000),

0 commit comments

Comments
 (0)