Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
6002CEM_ObadaNasr/ViewModels/LoginViewModel.cs
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
25 lines (17 sloc)
563 Bytes
This file contains 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
namespace app.ViewModels; | |
//partial class in order to be able to use source generators | |
public partial class LoginViewModel : ViewModel { | |
private readonly ISpotifyService spotifyService; | |
public LoginViewModel(ISpotifyService spotifyService) { | |
this.spotifyService = spotifyService; | |
} | |
[ObservableProperty] | |
private bool showLogin; | |
[RelayCommand] | |
private void OpenLogin() { | |
ShowLogin = true; | |
} | |
public async Task HandleAuthCode(string authCode) { | |
await spotifyService.Initialize(authCode); | |
} | |
} |