Skip to content

Commit

Permalink
Merge pull request #13358 from wordpress-mobile/fix/2797-PreviewDupli…
Browse files Browse the repository at this point in the history
…cate

[Modal Layout Picker] Prevents layout preview from creating a duplicate page
  • Loading branch information
malinajirka authored Nov 11, 2020
2 parents 4dfbc5e + 22f54e7 commit da32ded
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,9 @@ private void startObserving() {
return null;
}));
mEditPostRepository.getPostChanged().observe(this, postEvent -> postEvent.applyIfNotHandled(post -> {
mViewModel.savePostToDb(mEditPostRepository, mSite);
if (!mIsPreview) {
mViewModel.savePostToDb(mEditPostRepository, mSite);
}
return null;
}));
}
Expand Down

0 comments on commit da32ded

Please sign in to comment.