Merge pull request #112 from sk22/fix/space-in-empty-reply

Fix compose containing a wrong space as initial reply text
This commit is contained in:
Gregory K 2022-05-02 22:06:12 +03:00 committed by GitHub
commit fa75570254
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -449,7 +449,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
if(!mentions.contains(m))
mentions.add(m);
}
initialText=TextUtils.join(" ", mentions)+" ";
initialText=mentions.isEmpty() ? "" : TextUtils.join(" ", mentions)+" ";
if(savedInstanceState==null){
mainEditText.setText(initialText);
mainEditText.setSelection(mainEditText.length());