Did something stupid, forgot the pattern I was searching for was a regex. Fixed now, correctly escaped the pattern so it only removes "<space><dot><space>", rather than any single character surrounded by spaces, such as " a ", or " I ", etc.
Also fixed other issue, where if you replied to yourself you got a <space><dot><space> added to the toot that wasn't required.
This commit is contained in:
parent
41c9bc252f
commit
dcf5035976
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue