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

Fix NPE in EditPostActivty onPostUploaded #20954

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Changes from 1 commit
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 @@ -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
irfano marked this conversation as resolved.
Show resolved Hide resolved

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
Loading