1
0
Fork 0
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:
M66B 2023-02-11 09:18:40 +01:00
parent 4316b851fb
commit b559ff99ea
2 changed files with 6 additions and 3 deletions

View file

@ -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);

View file

@ -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) {