From 47d80baccdfa3d11237ab51a45b6ffe9c83ac076 Mon Sep 17 00:00:00 2001 From: Mario Zorz Date: Mon, 18 Jan 2021 18:02:16 -0300 Subject: [PATCH] sending FrameSaveCompleted and FrameSaveFailed events as sticky events --- .../com/wordpress/stories/compose/frame/FrameSaveService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stories/src/main/java/com/wordpress/stories/compose/frame/FrameSaveService.kt b/stories/src/main/java/com/wordpress/stories/compose/frame/FrameSaveService.kt index ff51b81ca..77000c0b2 100644 --- a/stories/src/main/java/com/wordpress/stories/compose/frame/FrameSaveService.kt +++ b/stories/src/main/java/com/wordpress/stories/compose/frame/FrameSaveService.kt @@ -329,7 +329,7 @@ class FrameSaveService : Service() { storySaveResult.frameSaveResult.add(FrameSaveResult(applyFrameIndexOverride(frameIndex), SaveSuccess)) // dispatch FrameSaveCompleted event - EventBus.getDefault().post(FrameSaveCompleted(storyIndex, frameIndex, frame.id)) + EventBus.getDefault().postSticky(FrameSaveCompleted(storyIndex, frameIndex, frame.id)) } override fun onFrameSaveCanceled(frameIndex: FrameIndex, frame: StoryFrameItem) { @@ -361,7 +361,7 @@ class FrameSaveService : Service() { storySaveResult.frameSaveResult.add(FrameSaveResult(applyFrameIndexOverride(frameIndex), SaveError(reason))) // dispatch FrameSaveFailed event - EventBus.getDefault().post(FrameSaveFailed(storyIndex, frameIndex, frame.id)) + EventBus.getDefault().postSticky(FrameSaveFailed(storyIndex, frameIndex, frame.id)) } fun attachProgressListener() {