Move compose content's EditText cursor to first when shared content parsed in ComposeActivity (#2030)

* multiple media upload support

* multiple media upload support

* multiple media upload support

* remove  typing

* Update app/src/main/res/values/strings.xml

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>

* remove magic number on string.xml and add to activity.

* move edittext cursor to first when shareBody parsed in ComposeActivity

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
main
lenchan139 4 years ago committed by Alibek Omarov
parent 5b34500255
commit 40a964abe5
  1. 3
      app/src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt
  2. 2
      app/src/main/res/values/strings.xml

@ -244,6 +244,9 @@ class ComposeActivity : BaseActivity(),
val left = min(start, end) val left = min(start, end)
val right = max(start, end) val right = max(start, end)
composeEditField.text.replace(left, right, shareBody, 0, shareBody.length) composeEditField.text.replace(left, right, shareBody, 0, shareBody.length)
// move edittext cursor to first when shareBody parsed
composeEditField.text.insert(0, "\n")
composeEditField.setSelection(0)
} }
} }
} }

@ -612,6 +612,8 @@
<string name="error_upload_max_media_reached">You cannot upload more than %1$d media attachments.</string> <string name="error_upload_max_media_reached">You cannot upload more than %1$d media attachments.</string>
<string name="dialog_delete_list_warning">Do you really want to delete the list %s?</string> <string name="dialog_delete_list_warning">Do you really want to delete the list %s?</string>
<string name="drafts_toot_failed_to_send">This toot failed to send!</string> <string name="drafts_toot_failed_to_send">This toot failed to send!</string>
<string name="new_drafts_warning"> <string name="new_drafts_warning">
The draft feature in Tusky has been completely redesigned to be faster, more user friendly and less buggy.\n The draft feature in Tusky has been completely redesigned to be faster, more user friendly and less buggy.\n
You can still access your old drafts via a button on the new drafts screen, You can still access your old drafts via a button on the new drafts screen,

Loading…
Cancel
Save