This commit is contained in:
tom79 2019-08-24 11:09:38 +02:00
parent f653c8ab84
commit fcf1b2b960
2 changed files with 4 additions and 4 deletions

View File

@ -2899,7 +2899,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
newContent += ":" + shortcode + ": ";
int newPosition = newContent.length();
if (currentCursorPosition < oldContent.length())
newContent += oldContent.substring(currentCursorPosition, oldContent.length() - 1);
newContent += oldContent.substring(currentCursorPosition, oldContent.length());
toot_content.setText(newContent);
toot_space_left.setText(String.valueOf(countLength(social, toot_content, toot_cw_content)));
toot_content.setSelection(newPosition);
@ -3046,7 +3046,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
newContent += "#" + tag + " ";
int newPosition = newContent.length();
if (currentCursorPosition < oldContent.length())
newContent += oldContent.substring(currentCursorPosition, oldContent.length() - 1);
newContent += oldContent.substring(currentCursorPosition, oldContent.length());
toot_content.setText(newContent);
toot_space_left.setText(String.valueOf(countLength(social, toot_content, toot_cw_content)));
toot_content.setSelection(newPosition);

View File

@ -433,7 +433,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
newContent += ":" + shortcode + ": ";
int newPosition = newContent.length();
if( currentCursorPosition < oldContent.length() )
newContent += oldContent.substring(currentCursorPosition, oldContent.length()-1);
newContent += oldContent.substring(currentCursorPosition, oldContent.length());
toot_content.setText(newContent);
toot_space_left.setText(String.valueOf(TootActivity.countLength(social, toot_content, toot_cw_content)));
toot_content.setSelection(newPosition);
@ -490,7 +490,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
newContent += "#" + tag + " ";
int newPosition = newContent.length();
if( currentCursorPosition < oldContent.length() )
newContent += oldContent.substring(currentCursorPosition, oldContent.length()-1);
newContent += oldContent.substring(currentCursorPosition, oldContent.length());
toot_content.setText(newContent);
toot_space_left.setText(String.valueOf(TootActivity.countLength(social,toot_content, toot_cw_content)));
toot_content.setSelection(newPosition);