Fix issue when sending messages with images
This commit is contained in:
parent
a7675fbe03
commit
dc8243fd19
|
@ -848,6 +848,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST)
|
||||
.build();
|
||||
WorkManager.getInstance(ComposeActivity.this).enqueue(request);
|
||||
|
||||
} else {
|
||||
new ThreadMessageService(ComposeActivity.this, instance, account.user_id, token, statusDraft, scheduledDate);
|
||||
}
|
||||
|
|
|
@ -346,7 +346,10 @@ public class StatusDraft implements Serializable {
|
|||
}
|
||||
try {
|
||||
Cursor c = db.query(Sqlite.TABLE_STATUS_DRAFT, null, Sqlite.COL_ID + " = '" + draftId + "'", null, null, null, null, "1");
|
||||
return convertCursorToStatusDraft(c);
|
||||
c.moveToFirst();
|
||||
StatusDraft statusDraft = convertCursorToStatusDraft(c);
|
||||
c.close();
|
||||
return statusDraft;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -400,7 +400,6 @@ public class ComposeWorker extends Worker {
|
|||
@NonNull
|
||||
private ForegroundInfo createForegroundInfo() {
|
||||
// Build a notification using bytesRead and contentLength
|
||||
|
||||
Context context = getApplicationContext();
|
||||
// This PendingIntent can be used to cancel the worker
|
||||
PendingIntent intent = WorkManager.getInstance(context)
|
||||
|
|
Loading…
Reference in New Issue