Skip to content

Commit

Permalink
bring null setters back to where they were
Browse files Browse the repository at this point in the history
  • Loading branch information
mzorz committed Jan 23, 2019
1 parent 2aa2f97 commit fd320bc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,6 @@ class PostListViewModel @Inject constructor(
publishPost(it)
}
CONFIRM_ON_CONFLICT_LOAD_REMOTE_POST_DIALOG_TAG -> localPostIdForConflictResolutionDialog?.let {
localPostIdForConflictResolutionDialog = null
// here load version from remote
updateConflictedPostWithItsRemoteVersion(it)
}
Expand Down Expand Up @@ -736,6 +735,8 @@ class PostListViewModel @Inject constructor(
originalPostCopyForConflictUndo = post.clone()
dispatcher.dispatch(PostActionBuilder.newFetchPostAction(RemotePostPayload(post, site)))
_toastMessage.postValue(ToastMessageHolder(R.string.toast_conflict_updating_post, Duration.SHORT))
} else {
localPostIdForConflictResolutionDialog = null
}
}

Expand All @@ -747,6 +748,8 @@ class PostListViewModel @Inject constructor(

val post = postStore.getPostByLocalPostId(localPostId) ?: return

localPostIdForConflictResolutionDialog = null

// keep a copy for undoing
originalPostCopyForConflictUndo = post.clone()

Expand Down

0 comments on commit fd320bc

Please sign in to comment.