Commit dc8243fd authored by Thomas's avatar Thomas
Browse files

Fix issue when sending messages with images

parent a7675fbe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
                }
+4 −1
Original line number Diff line number Diff line
@@ -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;
        }
+0 −1
Original line number Diff line number Diff line
@@ -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)