mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Remove unnecessary commit/uncommit
When the user reverts a commit, this causes the committed word to be changed. The user usually then goes back to edit that word. Going back to edit causes an uncommit, so that the editing actions are added onto the LogUnit containing the operations used to construct the word. But currently, reverting also involves its own commit/uncommit pair, with the caller performing the uncommit, and the commit happening inside the revert command. This may have been necessary in the past, when revert was called in different situations, but is unnecessary now. Furthermore, the guarding conditions are currently such that the uncommit doesn't always undo the effects of the commit, corrupting the log output. Change-Id: I74af41f4f1db2fcabfa496dcc4a2d7bd0af19b3a
This commit is contained in:
parent
7b0a148951
commit
993acbaaa2
@ -2572,8 +2572,6 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
||||
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||
ResearchLogger.latinIME_revertCommit(committedWord, originallyTypedWord,
|
||||
mWordComposer.isBatchMode(), mLastComposedWord.mSeparatorString);
|
||||
ResearchLogger.getInstance().uncommitCurrentLogUnit(committedWord,
|
||||
true /* dumpCurrentLogUnit */);
|
||||
}
|
||||
// Don't restart suggestion yet. We'll restart if the user deletes the
|
||||
// separator.
|
||||
|
@ -1418,7 +1418,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||
logUnit.setContainsCorrection();
|
||||
}
|
||||
researchLogger.mStatistics.recordRevertCommit(SystemClock.uptimeMillis());
|
||||
researchLogger.commitCurrentLogUnitAsWord(originallyTypedWord, Long.MAX_VALUE, isBatchMode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user