-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The purpose of this commit is to make the `update` function a bit easier to read and use. We do this by: - Introducing `createViewReference` which creates an `IORef` to a `View`. - Moving the parts of the code that creates a view reference from `refresh` to `createViewReference`, thus giving it one less concern. - The `refresh` function now takes a view reference and an update semaphor/lock/whatever it is as arguments and when the lock is unlocked it runs the `update` function. This is much easier to read and understand than having `refresh` returning a callback, which it did before. This change does not throw any shade on any of the earlier developers of this project, it only recognizes that I'm becoming less clever for each passing day.
- Loading branch information
Showing
2 changed files
with
25 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters