Code Study: GitHub Desktop / lib / stores / app-store.ts

The AppStore contains a list of stores in charge of different things.

Private Fields

Public Methods


The method loads the initial state for the app.

  1. Get the list of accounts in the cache
  2. Get all the local repositories
  3. Convert the accounts into an array of IGitHubUser, and cache the users in GitHubUserStore
  4. Initialize the UI component size (sidebarWidth, commitSummaryWidth)
  5. Update menu labels for editor, shell, and pull requests.
  6. Get the selected theme (selectedTheme)
  7. Refresh all accounts by fetching their latest info from the API.
tags: GitHub Desktop - Electron