stop cursor from jumping when upload finishes while composing toot
This commit is contained in:
parent
13ed5da741
commit
e5516749ed
|
@ -1307,10 +1307,9 @@ public final class ComposeActivity extends BaseActivity
|
||||||
builder.append(media.textUrl);
|
builder.append(media.textUrl);
|
||||||
builder.setSpan(item.uploadUrl, 1, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
builder.setSpan(item.uploadUrl, 1, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
int cursorStart = textEditor.getSelectionStart();
|
int cursorStart = textEditor.getSelectionStart();
|
||||||
|
int cursorEnd = textEditor.getSelectionEnd();
|
||||||
textEditor.append(builder);
|
textEditor.append(builder);
|
||||||
if (cursorStart == textEditor.getText().length()) {
|
textEditor.setSelection(cursorStart, cursorEnd);
|
||||||
textEditor.setSelection(cursorStart);
|
|
||||||
}
|
|
||||||
|
|
||||||
waitForMediaLatch.countDown();
|
waitForMediaLatch.countDown();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue