Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save frame refactor part 6 (8) - fix glitch on static background frames #256

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,18 @@ class ComposeLoopFrameActivity : AppCompatActivity(), OnStoryFrameSelectorTapped
// once all frames have been saved, issue a broadcast so the system knows these frames are ready
sendNewStoryReadyBroadcast(frameFileList)

// given saveStory for static images works with a ghost off screen buffer by removing / adding views to it,
// we need to refresh the selection so added views get properly re-added after frame iteration ends
refreshStoryFrameSelection()

// re-enable layout change animations
photoEditorView.layoutTransition = transition
}

private fun refreshStoryFrameSelection() {
storyViewModel.setSelectedFrameByUser(storyViewModel.getSelectedFrameIndex())
}

private fun addCurrentViewsToFrameAtIndex(index: Int) {
// first, remember the currently added views
val currentStoryFrameItem = storyViewModel.getCurrentStoryFrameAt(index)
Expand Down