Merged in PhotonQyv/mastodon_etalab/DamnRegex (pull request #53)

Sorry Tom, I messed up the original code, should really have taken my time with it...
This commit is contained in:
PhotonQyv 2017-08-12 05:53:51 +00:00 committed by tom79
commit 8d2d82b37d
1 changed files with 7 additions and 2 deletions

View File

@ -370,7 +370,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
the end toot cleaner.
*/
String preToot = toot_content.getText().toString().trim();
String postToot = preToot.replaceFirst(" . ", "");
String postToot = preToot.replaceFirst(" \\. ", "");
toot.setContent(postToot.trim());
}else {
@ -1169,8 +1169,13 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
}
}
}
//Put a "<space>dot<space>" at the end of all mentioned account to force capitalization
toot_content.append(" . ");
if (toot_content.getText().toString().startsWith("@")) {
//Put a "<space>dot<space>" at the end of all mentioned account to force capitalization
toot_content.append(" . ");
}
toot_content.setSelection(toot_content.getText().length()); //Put cursor at the end
}
}