-
-
Notifications
You must be signed in to change notification settings - Fork 310
Closed
Labels
cat: challengesChallenging a player, viewing the challenges, etc.Challenging a player, viewing the challenges, etc.cat: dataState management, data modelling, etc. Not related to UI.State management, data modelling, etc. Not related to UI.
Milestone
Description
This is not related to correspondence game challenges, they work differently and are received through a push notification.
Here it need a persistent websocket connection with the following specifics:
- should be open when the app has focus and closed when the app is in background
- it should listen to the
challengesevent to be aware of new challenges
Opening a persistent websocket connection is also the way to notify other users that the player is online. Closing #404 thus.
We'll also need a challengesProvider, which is a NotifierProvider.
Upon receiving a new challenge one should:
- display a notification, using the flutter_local_notifications plugin
- have a "decline" action button in the notification (clicking on the notification would mean accepting the challenge)
- update the
challengesProviderstate
The challenges message always contains the current list of all challenges, so we're notified when a challenge has been cancelled. When a challenge is canceled:
- cancel the corresponding challenge notification
- update the
challengesProviderstate
Metadata
Metadata
Assignees
Labels
cat: challengesChallenging a player, viewing the challenges, etc.Challenging a player, viewing the challenges, etc.cat: dataState management, data modelling, etc. Not related to UI.State management, data modelling, etc. Not related to UI.