Fix #41 - Delete & Redraft cannot be sent
This commit is contained in:
parent
97c926e8dc
commit
ac7dd0484d
|
@ -172,9 +172,11 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
statusDraftList.add(status);
|
||||
|
||||
//Restore a draft with all messages
|
||||
if (statusDraft != null && statusDraft.statusReplyList != null) {
|
||||
if (statusDraft != null) {
|
||||
new Thread(() -> {
|
||||
if (statusDraft.statusReplyList != null) {
|
||||
statusDraft.statusReplyList = SpannableHelper.convertStatus(getApplication().getApplicationContext(), statusDraft.statusReplyList);
|
||||
}
|
||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
Runnable myRunnable = () -> {
|
||||
if (statusDraft.statusReplyList != null) {
|
||||
|
|
|
@ -208,6 +208,9 @@ public class PostMessageService extends IntentService {
|
|||
if (statuses.get(i).media_attachments != null && statuses.get(i).media_attachments.size() > 0) {
|
||||
attachmentIds = new ArrayList<>();
|
||||
for (Attachment attachment : statuses.get(i).media_attachments) {
|
||||
if (attachment.id != null) {
|
||||
attachmentIds.add(attachment.id);
|
||||
} else {
|
||||
MultipartBody.Part fileMultipartBody;
|
||||
if (watermark && attachment.mimeType.contains("image")) {
|
||||
fileMultipartBody = Helper.getMultipartBodyWithWM(PostMessageService.this, watermarkText, "file", attachment);
|
||||
|
@ -230,6 +233,8 @@ public class PostMessageService extends IntentService {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
List<String> poll_options = null;
|
||||
Integer poll_expire_in = null;
|
||||
|
|
|
@ -1181,9 +1181,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
ImageViewCompat.setImageTintList(holder.binding.buttonPoll, null);
|
||||
}
|
||||
|
||||
holder.binding.buttonPost.setOnClickListener(v -> {
|
||||
manageDrafts.onSubmit(prepareDraft(statusList, this, account.instance, account.user_id));
|
||||
});
|
||||
holder.binding.buttonPost.setOnClickListener(v -> manageDrafts.onSubmit(prepareDraft(statusList, this, account.instance, account.user_id)));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1201,6 +1201,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
StatusDraft statusDraft = new StatusDraft();
|
||||
statusDraft.statusDraftList = new ArrayList<>();
|
||||
statusDraft.statusReplyList = new ArrayList<>();
|
||||
statusDeleted.id = null;
|
||||
statusDraft.statusDraftList.add(statusDeleted);
|
||||
intent.putExtra(Helper.ARG_STATUS_DRAFT, statusDraft);
|
||||
context.startActivity(intent);
|
||||
|
|
Loading…
Reference in New Issue