Skip to content

Instantly share code, notes, and snippets.

@mzorz
Created October 14, 2020 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzorz/83b64b49d7a6160cc7beb7c3fd329d15 to your computer and use it in GitHub Desktop.
Save mzorz/83b64b49d7a6160cc7beb7c3fd329d15 to your computer and use it in GitHub Desktop.
diff --git a/stories/src/main/java/com/wordpress/stories/compose/frame/FrameSaveManager.kt b/stories/src/main/java/com/wordpress/stories/compose/frame/FrameSaveManager.kt
index cbb3f253..be4926de 100644
--- a/stories/src/main/java/com/wordpress/stories/compose/frame/FrameSaveManager.kt
+++ b/stories/src/main/java/com/wordpress/stories/compose/frame/FrameSaveManager.kt
@@ -143,6 +143,12 @@ class FrameSaveManager(
try {
// create ghost PhotoEditorView to be used for saving off-screen
val ghostPhotoEditorView = createGhostPhotoEditor(context, photoEditor.composedCanvas)
+ if (test == 1) {
+ test++
+ throw Exception("THIS IS A TEST")
+ } else {
+ test++
+ }
frameFile = saveImageFrame(context, frame, ghostPhotoEditorView, frameIndex)
frame.composedFrameFile = frameFile
saveProgressListener?.onFrameSaveCompleted(frameIndex, frame)
@@ -342,6 +348,7 @@ class FrameSaveManager(
private const val VIDEO_CONCURRENCY_LIMIT = 3
private const val IMAGE_CONCURRENCY_LIMIT = 10
private const val VIDEO_PROCESSING_READY_WAIT_TIME_MILLIS: Long = 500
+ var test = 0
fun releaseAddedViews(frame: StoryFrameItem) {
// don't forget to remove these views from ghost offscreen view before exiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment