Repository navigation
Keep resolvedExternalEditor and selectedExternalEditor in sync - #8387
Merged
outofambit merged 8 commits intoOct 16, 2019
Merged
Conversation
This might be just me, but when I think `get` I imagine a simple getter that looks up and returns a value. Whereas this function is a bit more complex -- it looks in local storage and then looks up available editors per platform, checking the cache first. The term `lookup` may not be the bet either, but it's the best I can think of. I also wanted to do this because I am going to create an `updateSelectedExternalEditor` method, and it'd be weird to have `updateSelectedExternalEditor(this.getSelectedExternalEditor)`
…setting new value To ensure we avoid issues like #8322
In 86afd86 the logic to resolve the editor was moved to a different method and now it is no longer immediately after the tutorial assessor initialization
…t is Prior to this change, if the user uninstalled the editor they'd selected then we'd throw an error and would fail to resolve the current editor at startup
outofambit
self-requested a review
October 15, 2019 17:15
2 tasks
…is-installed Ensure editor from local storage is actually installed
outofambit
approved these changes
Oct 16, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
Follow up for #8380
Description
This PR expands upon #8380, extracting a method called
updateSelectedExternalEditorto ensure that we update theresolvedExternalEditorafter updating theselectedExternalEditor. By using this method, we can more easily guard against the two drifting out of sync, as they did in #8322.Release notes
Notes: no-notes
/ cc @niik @outofambit @billygriffin