Don't show authentication on app start if authentication is valid
parent
a42619ea8c
commit
7f93f806fd
|
@ -55,14 +55,17 @@ namespace LANCommander.PlaynitePlugin
|
||||||
|
|
||||||
public override void OnApplicationStarted(OnApplicationStartedEventArgs args)
|
public override void OnApplicationStarted(OnApplicationStartedEventArgs args)
|
||||||
{
|
{
|
||||||
ShowAuthenticationWindow();
|
if (LANCommander.Token == null || !LANCommander.ValidateToken(LANCommander.Token))
|
||||||
|
{
|
||||||
|
ShowAuthenticationWindow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IEnumerable<GameMetadata> GetGames(LibraryGetGamesArgs args)
|
public override IEnumerable<GameMetadata> GetGames(LibraryGetGamesArgs args)
|
||||||
{
|
{
|
||||||
var gameMetadata = new List<GameMetadata>();
|
var gameMetadata = new List<GameMetadata>();
|
||||||
|
|
||||||
if (LANCommander.Token != null && !LANCommander.ValidateToken(LANCommander.Token))
|
if (LANCommander.Token == null || !LANCommander.ValidateToken(LANCommander.Token))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue