Skip to content

Commit

Permalink
Merge pull request #632 from Automattic/rnmobile/stories-bridge-defer…
Browse files Browse the repository at this point in the history
…red-event-take2

Sending FrameSaveCompleted and FrameSaveFailed events as sticky events
  • Loading branch information
mzorz authored Feb 5, 2021
2 parents b3a658d + 20671e1 commit deaf18d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit deaf18d

Please sign in to comment.