Created
July 7, 2020 12:29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/stories/src/main/java/com/wordpress/stories/compose/ComposeLoopFrameActivity.kt b/stories/src/main/java/com/wordpress/stories/compose/ComposeLoopFrameActivity.kt | |
index fcd33b4e..6a7c623d 100644 | |
--- a/stories/src/main/java/com/wordpress/stories/compose/ComposeLoopFrameActivity.kt | |
+++ b/stories/src/main/java/com/wordpress/stories/compose/ComposeLoopFrameActivity.kt | |
@@ -91,6 +91,9 @@ import com.wordpress.stories.compose.story.StoryRepository | |
import com.wordpress.stories.compose.story.StoryViewModel | |
import com.wordpress.stories.compose.story.StoryViewModel.StoryFrameListItemUiState.StoryFrameListItemUiStateFrame | |
import com.wordpress.stories.compose.story.StoryViewModelFactory | |
+import com.wordpress.stories.compose.story.deserializeAddedViews | |
+import com.wordpress.stories.compose.story.serializeAddedView | |
+import com.wordpress.stories.compose.story.serializeAddedViews | |
import com.wordpress.stories.compose.text.TextEditorDialogFragment | |
import com.wordpress.stories.util.KEY_STORY_SAVE_RESULT | |
import com.wordpress.stories.util.STATE_KEY_CURRENT_STORY_INDEX | |
@@ -1061,6 +1064,16 @@ abstract class ComposeLoopFrameActivity : AppCompatActivity(), OnStoryFrameSelec | |
// set addedViews on the current frame (copy array so we don't share the same one with PhotoEditor) | |
currentStoryFrameItem?.addedViews = AddedViewList().copyOf(photoEditor.getViewsAdded()) | |
+ | |
+ // TODO REMOVE TEST CODE START | |
+ val serializedObj = serializeAddedViews(photoEditor.getViewsAdded()) | |
+ for (item in photoEditor.getViewsAdded()) { | |
+ val tetstSerializedObj = serializeAddedView(item) | |
+ Log.d("PORTKEY", "serialized obj: " + tetstSerializedObj) | |
+ } | |
+ val deserializedObj = deserializeAddedViews(serializedObj) | |
+ currentStoryFrameItem?.addedViews = deserializedObj | |
+ // TODO REMOVE TEST CODE END | |
} | |
private fun showMediaPicker() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/stories/src/main/java/com/wordpress/stories/compose/ComposeLoopFrameActivity.kt b/stories/src/main/java/com/wordpress/stories/compose/ComposeLoopFrameActivity.kt | |
index fcd33b4e..6a7c623d 100644 | |
--- a/stories/src/main/java/com/wordpress/stories/compose/ComposeLoopFrameActivity.kt | |
+++ b/stories/src/main/java/com/wordpress/stories/compose/ComposeLoopFrameActivity.kt | |
@@ -91,6 +91,9 @@ import com.wordpress.stories.compose.story.StoryRepository | |
import com.wordpress.stories.compose.story.StoryViewModel | |
import com.wordpress.stories.compose.story.StoryViewModel.StoryFrameListItemUiState.StoryFrameListItemUiStateFrame | |
import com.wordpress.stories.compose.story.StoryViewModelFactory | |
+import com.wordpress.stories.compose.story.deserializeAddedViews | |
+import com.wordpress.stories.compose.story.serializeAddedView | |
+import com.wordpress.stories.compose.story.serializeAddedViews | |
import com.wordpress.stories.compose.text.TextEditorDialogFragment | |
import com.wordpress.stories.util.KEY_STORY_SAVE_RESULT | |
import com.wordpress.stories.util.STATE_KEY_CURRENT_STORY_INDEX | |
@@ -1061,6 +1064,16 @@ abstract class ComposeLoopFrameActivity : AppCompatActivity(), OnStoryFrameSelec | |
// set addedViews on the current frame (copy array so we don't share the same one with PhotoEditor) | |
currentStoryFrameItem?.addedViews = AddedViewList().copyOf(photoEditor.getViewsAdded()) | |
+ | |
+ // TODO REMOVE TEST CODE START | |
+ val serializedObj = serializeAddedViews(photoEditor.getViewsAdded()) | |
+ for (item in photoEditor.getViewsAdded()) { | |
+ val tetstSerializedObj = serializeAddedView(item) | |
+ Log.d("PORTKEY", "serialized obj: " + tetstSerializedObj) | |
+ } | |
+ val deserializedObj = deserializeAddedViews(serializedObj) | |
+ currentStoryFrameItem?.addedViews = deserializedObj | |
+ // TODO REMOVE TEST CODE END | |
} | |
private fun showMediaPicker() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment