@@ -74,7 +74,12 @@ public MainBlazorUI()
74
74
{
75
75
if ( Properties . Settings . Default . tarkovTrackerToken != "" )
76
76
{
77
- TarkovTracker . SetToken ( e . Profile . Id , Properties . Settings . Default . tarkovTrackerToken ) ;
77
+ try {
78
+ TarkovTracker . SetToken ( e . Profile . Id , Properties . Settings . Default . tarkovTrackerToken ) ;
79
+ } catch ( Exception ex ) {
80
+ messageLog . AddMessage ( $ "Error setting token from previously saved settings { ex . Message } ", "exception" ) ;
81
+ }
82
+
78
83
Properties . Settings . Default . tarkovTrackerToken = "" ;
79
84
Properties . Settings . Default . Save ( ) ;
80
85
}
@@ -460,20 +465,20 @@ private async Task UpdateHideoutStations()
460
465
461
466
private async Task InitializeProgress ( )
462
467
{
463
- if ( TarkovTracker . GetToken ( eft . CurrentProfile . Id ) == "" )
464
- {
465
- messageLog . AddMessage ( "To automatically track task progress, set your Tarkov Tracker token in Settings" ) ;
466
- return ;
467
- }
468
- messageLog . AddMessage ( $ "Using { eft . CurrentProfile . Type } profile") ;
469
468
try
470
469
{
471
470
await TarkovTracker . SetProfile ( eft . CurrentProfile . Id ) ;
472
- return ;
473
471
}
474
472
catch ( Exception ex )
475
473
{
476
- messageLog . AddMessage ( $ "Error getting Tarkov Tracker progress: { ex . Message } ") ;
474
+ messageLog . AddMessage ( $ "Profile does not exist: { ex . Message } ") ;
475
+ return ;
476
+ }
477
+ messageLog . AddMessage ( $ "Using { eft . CurrentProfile . Type } profile") ;
478
+ if ( TarkovTracker . GetToken ( eft . CurrentProfile . Id ) == "" )
479
+ {
480
+ messageLog . AddMessage ( "To automatically track task progress, set your Tarkov Tracker token in Settings" ) ;
481
+ return ;
477
482
}
478
483
try
479
484
{
@@ -486,6 +491,7 @@ private async Task InitializeProgress()
486
491
catch ( Exception ex )
487
492
{
488
493
messageLog . AddMessage ( $ "Error updating progress: { ex . Message } ") ;
494
+ return ;
489
495
}
490
496
}
491
497
0 commit comments