mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix issue #112 - Cross-account replies broken
This commit is contained in:
parent
2f716b9b11
commit
33b589f4a3
1 changed files with 10 additions and 8 deletions
|
@ -129,8 +129,8 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
statusReplyId = b.getString(Helper.ARG_STATUS_REPLY_ID);
|
||||
statusMention = (Status) b.getSerializable(Helper.ARG_STATUS_MENTION);
|
||||
account = (Account) b.getSerializable(Helper.ARG_ACCOUNT);
|
||||
instance = b.getString(Helper.ARG_INSTANCE, BaseMainActivity.currentInstance);
|
||||
token = b.getString(Helper.ARG_TOKEN, BaseMainActivity.currentToken);
|
||||
instance = b.getString(Helper.ARG_INSTANCE, null);
|
||||
token = b.getString(Helper.ARG_TOKEN, null);
|
||||
visibility = b.getString(Helper.ARG_VISIBILITY, null);
|
||||
accountMention = (app.fedilab.android.client.entities.api.Account) b.getSerializable(Helper.ARG_ACCOUNT_MENTION);
|
||||
}
|
||||
|
@ -159,15 +159,16 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
status.visibility = scheduledStatus.params.visibility;
|
||||
statusDraft.statusDraftList = statuses;
|
||||
}
|
||||
if (instance == null) {
|
||||
instance = BaseMainActivity.currentInstance;
|
||||
}
|
||||
if (token == null) {
|
||||
token = BaseMainActivity.currentToken;
|
||||
}
|
||||
if (account == null) {
|
||||
account = BaseMainActivity.accountWeakReference.get();
|
||||
}
|
||||
if (instance == null) {
|
||||
instance = account.instance;
|
||||
}
|
||||
if (token == null) {
|
||||
token = account.token;
|
||||
}
|
||||
|
||||
StatusesVM statusesVM = new ViewModelProvider(ComposeActivity.this).get(StatusesVM.class);
|
||||
//Empty compose
|
||||
List<Status> statusDraftList = new ArrayList<>();
|
||||
|
@ -546,6 +547,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
statusDraft.statusDraftList = statusDrafts;
|
||||
statusDraft.instance = account.instance;
|
||||
statusDraft.user_id = account.user_id;
|
||||
|
||||
if (!canBeSent(statusDraft)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue