When creating a post, there is sometimes a small delay between pressing the final post button and going back to the home screen. During that delay, if you press the post button again, it makes a new post with the same details.
Reproduction Steps
First try to create a new post. After adding all the details to it, try pressing the final create post button multiple times. You will be able to then see duplicate posts (they have different object IDs) in the feed and in MongoDB.
Expected Behavior
Make it such that even if the button is pressed several times on the same screen it only creates one post.
Description
When creating a post, there is sometimes a small delay between pressing the final post button and going back to the home screen. During that delay, if you press the post button again, it makes a new post with the same details.
Reproduction Steps
First try to create a new post. After adding all the details to it, try pressing the final create post button multiple times. You will be able to then see duplicate posts (they have different object IDs) in the feed and in MongoDB.
Expected Behavior
Make it such that even if the button is pressed several times on the same screen it only creates one post.