Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#494) Refresh sources from file #955

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Commits on Sep 2, 2022

  1. (chocolatey#494) Refresh the sources from file each time

    Sometimes (it looks like maybe when the Chocolatey Licensed Extension is
    in play) we don't get the sources currently in the configuration file.
    If instead of reusing the configuration settings service we instantiate
    a new one each time, then it will ensure the configuration file is read
    again. This resolves the issue of settings not applying in GUI if
    they're made while GUI is running.
    corbob committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    583b1b9 View commit details
    Browse the repository at this point in the history
  2. (chocolatey#494) Watch Chocolatey config file for changes

    When Chocolatey CLI makes changes to the configuration file while
    Chocolatey GUI is running, Chocolatey GUI should refresh the sources so
    that they're accurate. This adds a FileSystemWatcher to monitor the
    configuration file and update the GUI if there's updates to the file.
    corbob committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    1d690a1 View commit details
    Browse the repository at this point in the history
  3. (chocolatey#494) Don't trigger SourcesUpdated messages

    With the FileSystemWatcher, we don't need to manually tell Chocolatey
    GUI to update the sources, as they'll be updated by the
    FileSystemWatcher. Leaving them in results in duplicated entries that we
    don't want.
    corbob committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    dcb3405 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2022

  1. (chocolatey#494) Address review comments

    Renamed configuration file variable to indicate it's the path to the
    configuration file. Made ConfigFileChanged public and added it to the
    interface. Also renamed it to OnConfigFileChanged as that seems to be a
    better name to indicate it's the action for when the file changes.
    corbob committed Sep 6, 2022
    Configuration menu
    Copy the full SHA
    f377968 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75a6c35 View commit details
    Browse the repository at this point in the history