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 issue where navigating to post after post creation throws error #1416

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

hjiangsu
Copy link
Member

@hjiangsu hjiangsu commented Jun 3, 2024

Pull Request Description

This is a small PR which fixes an issue where navigating to the post page after creation would throw an error. The issue comes from the fact that the new post page only accepts postViewMedia as a parameter (for now) rather than both postViewMedia or postId. Since the snackbar attempts to pass in a postId, the new post page is unable to use that information to load the post.

Luckily, the onPostSuccess returns back the full postViewMedia, so we can just use that!

Issue Being Fixed

Issue Number: #1413

Screenshots / Recordings

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

Copy link
Member

@micahmo micahmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, glad this was an easy fix!

lib/post/utils/navigate_create_post.dart Show resolved Hide resolved
@hjiangsu hjiangsu merged commit 85883c7 into develop Jun 3, 2024
1 check passed
@hjiangsu hjiangsu deleted the fix/create-post-page-snackbar branch June 3, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants