forked from mirrors/Fedilab
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);
|
statusReplyId = b.getString(Helper.ARG_STATUS_REPLY_ID);
|
||||||
statusMention = (Status) b.getSerializable(Helper.ARG_STATUS_MENTION);
|
statusMention = (Status) b.getSerializable(Helper.ARG_STATUS_MENTION);
|
||||||
account = (Account) b.getSerializable(Helper.ARG_ACCOUNT);
|
account = (Account) b.getSerializable(Helper.ARG_ACCOUNT);
|
||||||
instance = b.getString(Helper.ARG_INSTANCE, BaseMainActivity.currentInstance);
|
instance = b.getString(Helper.ARG_INSTANCE, null);
|
||||||
token = b.getString(Helper.ARG_TOKEN, BaseMainActivity.currentToken);
|
token = b.getString(Helper.ARG_TOKEN, null);
|
||||||
visibility = b.getString(Helper.ARG_VISIBILITY, null);
|
visibility = b.getString(Helper.ARG_VISIBILITY, null);
|
||||||
accountMention = (app.fedilab.android.client.entities.api.Account) b.getSerializable(Helper.ARG_ACCOUNT_MENTION);
|
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;
|
status.visibility = scheduledStatus.params.visibility;
|
||||||
statusDraft.statusDraftList = statuses;
|
statusDraft.statusDraftList = statuses;
|
||||||
}
|
}
|
||||||
if (instance == null) {
|
|
||||||
instance = BaseMainActivity.currentInstance;
|
|
||||||
}
|
|
||||||
if (token == null) {
|
|
||||||
token = BaseMainActivity.currentToken;
|
|
||||||
}
|
|
||||||
if (account == null) {
|
if (account == null) {
|
||||||
account = BaseMainActivity.accountWeakReference.get();
|
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);
|
StatusesVM statusesVM = new ViewModelProvider(ComposeActivity.this).get(StatusesVM.class);
|
||||||
//Empty compose
|
//Empty compose
|
||||||
List<Status> statusDraftList = new ArrayList<>();
|
List<Status> statusDraftList = new ArrayList<>();
|
||||||
|
@ -546,6 +547,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
||||||
statusDraft.statusDraftList = statusDrafts;
|
statusDraft.statusDraftList = statusDrafts;
|
||||||
statusDraft.instance = account.instance;
|
statusDraft.instance = account.instance;
|
||||||
statusDraft.user_id = account.user_id;
|
statusDraft.user_id = account.user_id;
|
||||||
|
|
||||||
if (!canBeSent(statusDraft)) {
|
if (!canBeSent(statusDraft)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue