desmos-labs / mooncake

The first decentralized social app based on Desmos
MIT License
46 stars 14 forks source link

Post status is not updated if app is closed prematurely #81

Closed RiccardoM closed 4 years ago

RiccardoM commented 4 years ago
## Generic information - OS name and version: Android 9 - Application build code: `4102` - Network type (mobile/Wi-Fi): Both ## Bug description When a post is created, the following series of actions is performed: 1. The post is created locally. 2. The post is sent to the chain. 3. If the transaction is successful or it fails, a push notification is sent to the device. 4. The post status is updated based on the notification result. Unluckily, if the application is closed in between 2 and 3, the post status never gets updated. This is even more disturbing since refreshing the posts list does not update the post status even if it has already been sent to the chain. ## Steps to reproduce 1. Create a post. 2. Wait for the sync to complete. 3. Close the app 4. Wait 15 seconds, then open again the app. The post will be in the wrong state (its background is going to stay dimmed). Even refreshing the posts list, the status is not updated. ## Expected behavior The post status should be updated and sent as being stored online if the remote contents are equals to the local ones.