File tree Expand file tree Collapse file tree 1 file changed +21
-14
lines changed Expand file tree Collapse file tree 1 file changed +21
-14
lines changed Original file line number Diff line number Diff line change 1
- using System ;
1
+ using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
4
using System . Threading ;
@@ -1440,26 +1440,33 @@ public void UpdateResultView(ICollection<ResultsForUpdate> resultsForUpdates)
1440
1440
}
1441
1441
#endif
1442
1442
1443
- foreach ( var metaResults in resultsForUpdates )
1443
+ try
1444
1444
{
1445
- foreach ( var result in metaResults . Results )
1445
+ foreach ( var metaResults in resultsForUpdates )
1446
1446
{
1447
- if ( _topMostRecord . IsTopMost ( result ) )
1448
- {
1449
- result . Score = int . MaxValue ;
1450
- }
1451
- else
1447
+ foreach ( var result in metaResults . Results )
1452
1448
{
1453
- var priorityScore = metaResults . Metadata . Priority * 150 ;
1454
- result . Score += _userSelectedRecord . GetSelectedCount ( result ) + priorityScore ;
1449
+ if ( _topMostRecord . IsTopMost ( result ) )
1450
+ {
1451
+ result . Score = int . MaxValue ;
1452
+ }
1453
+ else
1454
+ {
1455
+ var priorityScore = metaResults . Metadata . Priority * 150 ;
1456
+ result . Score += _userSelectedRecord . GetSelectedCount ( result ) + priorityScore ;
1457
+ }
1455
1458
}
1456
1459
}
1457
- }
1458
1460
1459
- // it should be the same for all results
1460
- bool reSelect = resultsForUpdates . First ( ) . ReSelectFirstResult ;
1461
+ // it should be the same for all results
1462
+ bool reSelect = resultsForUpdates . First ( ) . ReSelectFirstResult ;
1461
1463
1462
- Results . AddResults ( resultsForUpdates , token , reSelect ) ;
1464
+ Results . AddResults ( resultsForUpdates , token , reSelect ) ;
1465
+ }
1466
+ catch ( Exception ex )
1467
+ {
1468
+ Log . Debug ( "MainViewModel" , $ "Error in UpdateResultView: { ex . Message } ") ;
1469
+ }
1463
1470
}
1464
1471
1465
1472
#endregion
You can’t perform that action at this time.
0 commit comments