Fix issue #354 - Sharing a single media does not prompt the accounts

pull/434/head
Thomas 2 years ago
parent e0207251d1
commit a7008cdaa2

@ -476,10 +476,9 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
} else if (type.startsWith("image/") || type.startsWith("video/")) { } else if (type.startsWith("image/") || type.startsWith("video/")) {
Uri imageUri = intent.getParcelableExtra(Intent.EXTRA_STREAM); Uri imageUri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
if (imageUri != null) { if (imageUri != null) {
intent = new Intent(BaseMainActivity.this, ComposeActivity.class); Bundle b = new Bundle();
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); b.putParcelable(Helper.ARG_SHARE_URI, imageUri);
intent.putExtra(Helper.ARG_SHARE_URI, imageUri); CrossActionHelper.doCrossShare(BaseMainActivity.this, b);
startActivity(intent);
} else { } else {
Toasty.warning(BaseMainActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show(); Toasty.warning(BaseMainActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
} }

@ -361,7 +361,6 @@ public class Account extends BaseAccount implements Serializable {
List<BaseAccount> accountList = new ArrayList<>(); List<BaseAccount> accountList = new ArrayList<>();
while (c.moveToNext()) { while (c.moveToNext()) {
BaseAccount account = convertCursorToAccount(c); BaseAccount account = convertCursorToAccount(c);
//We don't add in the list the current connected account
accountList.add(account); accountList.add(account);
} }
//Close the cursor //Close the cursor

Loading…
Cancel
Save