mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-26 06:47:03 +03:00
Merge two ifs in NotesTextWatcher
This commit is contained in:
parent
8f8ae9772f
commit
5daf7fcc10
1 changed files with 1 additions and 3 deletions
|
@ -88,14 +88,12 @@ public abstract class NotesTextWatcher implements TextWatcher {
|
|||
Log.v(TAG, "Entered a character directly behind a codeBlock - prepare selection reset to " + resetSelectionTo);
|
||||
}
|
||||
}
|
||||
} else if (s.subSequence(startOfLine, start + count).toString().startsWith(codeBlock)) {
|
||||
if (!resetSelection) {
|
||||
} else if (s.subSequence(startOfLine, start + count).toString().startsWith(codeBlock) && !resetSelection) {
|
||||
resetSelectionTo = editText.getSelectionEnd();
|
||||
resetSelection = true;
|
||||
Log.v(TAG, "One completed a ``-codeBlock with the third `-character - prepare selection reset to " + resetSelectionTo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setNewText(@NonNull StringBuilder newText, int selection) {
|
||||
editText.setText(newText);
|
||||
|
|
Loading…
Reference in a new issue