Skip to content

Commit

Permalink
fix inclusion of separator in language popup keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Helium314 committed Feb 14, 2024
1 parent b4a223a commit daa20a1
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ class LocaleKeyboardInfos(dataStream: InputStream?, locale: Locale) {
val priorityMarkerIndex = split.indexOf("%")
if (priorityMarkerIndex > 0) {
val existingPriorityPopupKeys = priorityPopupKeys[key]
priorityPopupKeys[key] = if (existingPriorityPopupKeys == null)
split.subList(1, priorityMarkerIndex)
else existingPriorityPopupKeys + split.subList(1, priorityMarkerIndex)
val newPriorityPopupKeys = split.subList(1, priorityMarkerIndex)
priorityPopupKeys[key] = if (existingPriorityPopupKeys == null) newPriorityPopupKeys
else existingPriorityPopupKeys + newPriorityPopupKeys
val existingPopupKeys = popupKeys[key]
popupKeys[key] = if (existingPopupKeys == null)
split.subList(priorityMarkerIndex, split.size)
else existingPopupKeys + split.subList(priorityMarkerIndex, split.size)
val newPopupKeys = split.subList(priorityMarkerIndex + 1, split.size)
popupKeys[key] = if (existingPopupKeys == null) newPopupKeys
else existingPopupKeys + newPopupKeys
} else {
// a but more special treatment, this should not occur together with priority marker (but technically could)
val existingPopupKeys = popupKeys[key]
Expand Down

0 comments on commit daa20a1

Please sign in to comment.