mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 02:37:16 +00:00
Auto save on (semi)colon and question/exclamation mark too
This commit is contained in:
parent
4316b851fb
commit
b559ff99ea
2 changed files with 6 additions and 3 deletions
|
@ -670,7 +670,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
char b = text.charAt(index - 1);
|
||||
|
||||
save = (auto_save_paragraph && c == '\n' && b != '\n') ||
|
||||
(auto_save_dot && Helper.isDot(c) && !Helper.isDot(b));
|
||||
(auto_save_dot && Helper.isEndChar(c) && !Helper.isEndChar(b));
|
||||
if (save)
|
||||
Log.i("Save=" + index);
|
||||
|
||||
|
|
|
@ -2329,8 +2329,11 @@ public class Helper {
|
|||
};
|
||||
}
|
||||
|
||||
static boolean isDot(char c) {
|
||||
return (c == '.' /* Latin */ || c == '。' /* Chinese */);
|
||||
static boolean isEndChar(char c) {
|
||||
return (c == '.' /* Latin */ ||
|
||||
c == '。' /* Chinese */ ||
|
||||
c == ':' || c == ';' ||
|
||||
c == '?' || c == '!');
|
||||
}
|
||||
|
||||
static String trim(String value, String chars) {
|
||||
|
|
Loading…
Reference in a new issue