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

This commit is contained in:
Thomas 2022-10-16 11:39:16 +02:00
parent e0207251d1
commit a7008cdaa2
2 changed files with 3 additions and 5 deletions

View file

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

View file

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