in src/dotnet/JetBrains.PresentationAssistant/PresentationAssistant.cs [17:41]
public PresentationAssistant(Lifetime lifetime,
ShortcutProvider shortcutProvider,
PresentationAssistantWindowOwner presentationAssistantWindowOwner,
PresentationAssistantSettingsStore settingsStore,
IThreading threading)
{
this.shortcutProvider = shortcutProvider;
this.presentationAssistantWindowOwner = presentationAssistantWindowOwner;
this.settingsStore = settingsStore;
// Post to the UI thread so that the app has time to start before we show the message
threading.ExecuteOrQueue("Presentation Assistant initial message", () =>
{
var settings = settingsStore.GetSettings();
UpdateSettings(!settings.WelcomeMessageShown);
settings.WelcomeMessageShown = true;
settingsStore.SetSettings(settings);
});
// Post to the UI thread because settings change are raised on a background thread.
// Has the unfortunate side effect that the action disabling the assistant is shown
// very briefly, so we blacklist it
settingsStore.SettingsChanged.Advise(lifetime,
_ => threading.ExecuteOrQueue("Presentation Assistant update enabled", () => UpdateSettings(true)));
}