File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using System ;
1+ using System ;
22using System . Collections . Generic ;
33using System . Linq ;
44using System . Threading ;
@@ -1440,26 +1440,33 @@ public void UpdateResultView(ICollection<ResultsForUpdate> resultsForUpdates)
14401440 }
14411441#endif
14421442
1443- foreach ( var metaResults in resultsForUpdates )
1443+ try
14441444 {
1445- foreach ( var result in metaResults . Results )
1445+ foreach ( var metaResults in resultsForUpdates )
14461446 {
1447- if ( _topMostRecord . IsTopMost ( result ) )
1448- {
1449- result . Score = int . MaxValue ;
1450- }
1451- else
1447+ foreach ( var result in metaResults . Results )
14521448 {
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+ }
14551458 }
14561459 }
1457- }
14581460
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 ;
14611463
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+ }
14631470 }
14641471
14651472 #endregion
You can’t perform that action at this time.
0 commit comments