mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 97eaa543
: Don\'t count Spacer into histograms
* commit '97eaa543d5fd4ac57516a586477641c129828b5d': Don't count Spacer into histograms
This commit is contained in:
commit
9a848fc867
@ -84,11 +84,16 @@ public class KeyboardParams {
|
||||
|
||||
public void onAddKey(final Key newKey) {
|
||||
final Key key = (mKeysCache != null) ? mKeysCache.get(newKey) : newKey;
|
||||
final boolean zeroWidthSpacer = key.isSpacer() && key.mWidth == 0;
|
||||
if (!zeroWidthSpacer) {
|
||||
mKeys.add(key);
|
||||
updateHistogram(key);
|
||||
final boolean isSpacer = key.isSpacer();
|
||||
if (isSpacer && key.mWidth == 0) {
|
||||
// Ignore zero width {@link Spacer}.
|
||||
return;
|
||||
}
|
||||
mKeys.add(key);
|
||||
if (isSpacer) {
|
||||
return;
|
||||
}
|
||||
updateHistogram(key);
|
||||
if (key.mCode == Constants.CODE_SHIFT) {
|
||||
mShiftKeys.add(key);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user