Changed the code so that the shorter text_url of an attachment is added to the toot, to save a few characters, to give user a few more to use for their message.

This commit is contained in:
PhotonQyv 2017-08-24 14:51:18 +01:00
parent ea15fd7a88
commit 6d87ab0c75
1 changed files with 2 additions and 2 deletions

View File

@ -839,9 +839,9 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
boolean show_media_urls = sharedpreferences.getBoolean(Helper.SET_MEDIA_URLS, true);
if( show_media_urls) {
//Adds the url at the end of the toot
//Adds the shorter text_url of attachment at the end of the toot
int selectionBefore = toot_content.getSelectionStart();
toot_content.setText(toot_content.getText().toString() + "\n" + attachment.getUrl());
toot_content.setText(toot_content.getText().toString() + "\n" + attachment.getText_url());
//Moves the cursor
if (selectionBefore >= 0)
toot_content.setSelection(selectionBefore);