Installer: add setter for HistoryChecker and VersionChecker. #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Gandalf is great, I really liked it! It provides the most features that my team-project needs.
However, I'd like to add a custom
HistoryChecker
setter (andVersionChecker
btw) to make it more customizable.Issue
In my case, our team hopes that the optional-update-window show up every time when user launches the app. However, the
DefaultHistoryChecker
has made the rule: when launched Gandalf, it will check the optional-update version last time saved in local preference, and if it is identical to the version this time, it will makeGateKeeper.updateIsOptional
returns false, causing Gandalf to not show up the window.Proposal of Solution
After a little dig into the code, I think it is appropriate to add setter function in
Gandalf.Installer
, as most of other members has been allowed to re-set here, andHistoryChecker
is designed as an interface. By adding this, I can implement my customHistoryChecker
, and hence solve the issue above.I'm willing to discuss. If you have any thought or suggestion about this, please let me know :)