end-hunger-durham / pantries-android

An android app that directs Durham, NC residents to nearby, open food pantries
2 stars 1 forks source link

Use actors to maintain state in Backend #31

Open robert-w-gries opened 5 years ago

robert-w-gries commented 5 years ago

After trying to restart the Refresh animation in the MapFragment class after multiple clicks of the Refresh icon, it became clear that the proper way to handle it will require architecture changes. One suggestion I found was to use actors in the backend or ViewModel to maintain state and prevent multiple calls to the Refresh action.

Using the CONFLATED property, we can ensure that the latest call is the only call being processed.

Helpful Links