Put the replace back in, only this time used replaceFirst() as I should have done in the first place. So now the toot posted is cleaner, without the spurious " . ".
This commit is contained in:
parent
0b1fcd16c0
commit
7592f83b9a
|
@ -359,9 +359,24 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
|||
if( toot_cw_content.getText().toString().trim().length() > 0)
|
||||
toot.setSpoiler_text(toot_cw_content.getText().toString().trim());
|
||||
toot.setVisibility(visibility);
|
||||
toot.setContent(toot_content.getText().toString().trim());
|
||||
if( tootReply != null)
|
||||
|
||||
if( tootReply != null) {
|
||||
toot.setIn_reply_to_id(tootReply.getId());
|
||||
|
||||
/*
|
||||
Strip the first appearance of " . "
|
||||
that we added to get capitalisation,
|
||||
from toot before posting it. Makes
|
||||
the end toot cleaner.
|
||||
*/
|
||||
String preToot = toot_content.getText().toString().trim();
|
||||
String postToot = preToot.replaceFirst(" . ", "");
|
||||
|
||||
toot.setContent(postToot.trim());
|
||||
}else {
|
||||
toot.setContent(toot_content.getText().toString().trim());
|
||||
}
|
||||
|
||||
new PostStatusAsyncTask(getApplicationContext(), toot, TootActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue