Skip to content

Commit 9d8dc54

Browse files
committed
Remove now unused worker setProgress
This code was forgotten and is not needed anymore since we changed the way the sending/saving confirmation snackbar is displayed
1 parent d7000c4 commit 9d8dc54

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

app/src/main/java/com/infomaniak/mail/workers/DraftsActionsWorker.kt

-12
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ class DraftsActionsWorker @AssistedInject constructor(
101101

102102
isSnackbarFeedbackNeeded = !mainApplication.isAppInBackground
103103

104-
notifyNewDraftDetected()
105-
106104
return@withContext handleDraftsActions()
107105
}
108106

@@ -116,15 +114,6 @@ class DraftsActionsWorker @AssistedInject constructor(
116114
return ForegroundInfo(NotificationUtils.DRAFT_ACTIONS_ID, builder.build())
117115
}
118116

119-
private suspend fun notifyNewDraftDetected() {
120-
draftLocalUuid?.let { localUuid ->
121-
val draft = draftController.getDraft(localUuid) ?: return@let
122-
if (draft.action == DraftAction.SEND && isSnackbarFeedbackNeeded) {
123-
setProgress(workDataOf(PROGRESS_DRAFT_ACTION_KEY to DraftAction.SEND.name))
124-
}
125-
}
126-
}
127-
128117
private suspend fun handleDraftsActions(): Result {
129118

130119
SentryDebug.addDraftsBreadcrumbs(
@@ -445,7 +434,6 @@ class DraftsActionsWorker @AssistedInject constructor(
445434
private const val USER_ID_KEY = "userId"
446435
private const val MAILBOX_ID_KEY = "mailboxIdKey"
447436
private const val DRAFT_LOCAL_UUID_KEY = "draftLocalUuidKey"
448-
const val PROGRESS_DRAFT_ACTION_KEY = "progressDraftActionKey"
449437
const val ERROR_MESSAGE_RESID_KEY = "errorMessageResIdKey"
450438
const val REMOTE_DRAFT_UUID_KEY = "remoteDraftUuidKey"
451439
const val ASSOCIATED_MAILBOX_UUID_KEY = "associatedMailboxUuidKey"

0 commit comments

Comments
 (0)