Skip to content

Commit 7c83db4

Browse files
Format comment
1 parent b04ce46 commit 7c83db4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/main/java/com/infomaniak/mail/ui/MainActivity.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ class MainActivity : BaseActivity() {
330330
* We want to scheduleWork after a delay in the off chance where we came back from NewMessageActivity while an Activity
331331
* recreation got triggered.
332332
*
333-
* We need to give time to the NewMessageActivity to save the last state of the draft in realm and then scheduleWork on its
334-
* own. Not waiting would scheduleWork before NewMessageActivity has time to write to realm and schedule its own worker. This
335-
* would result in an attempt to save any temporary draft saved to realm because of saveDraftDebouncing() effectively sending
336-
* a second unwanted draft.
333+
* We need to give time to the NewMessageActivity to save the last state of the draft in Realm and then scheduleWork on its
334+
* own. Not waiting would scheduleWork before NewMessageActivity has time to write to Realm and schedule its own worker. This
335+
* would result in an attempt to save any temporary Draft saved to Realm because of saveDraftDebouncing() effectively sending
336+
* a second unwanted Draft.
337337
*/
338338
private fun scheduleDraftActionsWorkWithDelay() = lifecycleScope.launch(Dispatchers.IO) {
339339
delay(1_000L)

0 commit comments

Comments
 (0)