Skip to content

Commit

Permalink
Safely access editPostRepository.id
Browse files Browse the repository at this point in the history
  • Loading branch information
zwarm committed Jun 7, 2024
1 parent 721f73d commit 6162e6e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3813,7 +3813,9 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
@Subscribe(threadMode = ThreadMode.MAIN)
fun onPostUploaded(event: OnPostUploaded) {
val post: PostModel? = event.post
if (post != null && post.id == editPostRepository.id) {
val editPostId = editPostRepository.getPost()?.id

if (post != null && post.id == editPostId) {
if (!isRemotePreviewingFromEditor) {
// We are not remote previewing a post: show snackbar and update post status if needed
val snackbarAttachView = findViewById<View>(R.id.editor_activity)
Expand Down

0 comments on commit 6162e6e

Please sign in to comment.