mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
little fix
This commit is contained in:
parent
499f10ea39
commit
39f3fe8601
2 changed files with 13 additions and 6 deletions
|
@ -405,7 +405,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
|
|||
if (imageUri != null) {
|
||||
intent = new Intent(BaseMainActivity.this, ComposeActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
intent.putExtra(Helper.ARG_SHARE_URI, imageUri.toString());
|
||||
intent.putExtra(Helper.ARG_SHARE_URI, imageUri);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
Toasty.warning(BaseMainActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||
|
|
|
@ -358,12 +358,19 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
}, 0, 10000);
|
||||
|
||||
if (sharedUriList != null && sharedUriList.size() > 0) {
|
||||
List<Uri> uris = new ArrayList<>(sharedUriList);
|
||||
composeAdapter.addAttachment(-1, uris);
|
||||
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(() -> {
|
||||
List<Uri> uris = new ArrayList<>(sharedUriList);
|
||||
composeAdapter.addAttachment(-1, uris);
|
||||
}, 1000);
|
||||
} else if (sharedUri != null && !sharedUri.toString().startsWith("http")) {
|
||||
List<Uri> uris = new ArrayList<>();
|
||||
uris.add(sharedUri);
|
||||
composeAdapter.addAttachment(-1, uris);
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(() -> {
|
||||
List<Uri> uris = new ArrayList<>();
|
||||
uris.add(sharedUri);
|
||||
composeAdapter.addAttachment(-1, uris);
|
||||
}, 1000);
|
||||
} else if (shareURL != null) {
|
||||
Helper.download(ComposeActivity.this, sharedUrlMedia, new OnDownloadInterface() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue