-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: integrate the tray app with RPC #19
Conversation
- Modularizes the tray window to use multiple Pages for the three different states: signed out, disconnected from RPC, normal - Adds the two new aforementioned pages - Adds a CredentialManager service for storing credentials in Windows Credential Manager - Adds a RpcController service for managing the connection to the backend service and reporting state changes to the ViewModel - Switches to using separate ViewModels in the Views - Switches to using Dependency Injection for instantiating Views, ViewModels and Services - Integrates the tray window into the new RpcController on Start/Stop interactions. Workspace agent updates will be handled in a separate PR
services.AddSingleton<ICredentialManager, CredentialManager>(); | ||
services.AddSingleton<IRpcController, RpcController>(); | ||
|
||
services.AddTransient<TrayWindowDisconnectedViewModel>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want the view models to be singletons as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to. They use other singletons as a source of truth for their data so there isn't really a point to making an interface for them.
Writing an interface for a ViewModel is also a pain AFAIK because of all of the observable property stuff that would need to be added to the interface for each property.
Relates to #5 (I will do agent updates immediately after this)