File tree Expand file tree Collapse file tree 1 file changed +13
-22
lines changed Expand file tree Collapse file tree 1 file changed +13
-22
lines changed Original file line number Diff line number Diff line change @@ -1447,35 +1447,26 @@ public void UpdateResultView(ICollection<ResultsForUpdate> resultsForUpdates)
14471447            } 
14481448#endif
14491449
1450-             try 
1450+             foreach   ( var   metaResults   in   resultsForUpdates ) 
14511451            { 
1452-                 foreach  ( var  metaResults  in  resultsForUpdates ) 
1452+                 foreach  ( var  result  in  metaResults . Results ) 
14531453                { 
1454-                     foreach   ( var   result   in   metaResults . Results ) 
1454+                     if   ( _topMostRecord . IsTopMost ( result ) ) 
14551455                    { 
1456-                         if  ( _topMostRecord . IsTopMost ( result ) ) 
1457-                         { 
1458-                             result . Score  =  int . MaxValue ; 
1459-                         } 
1460-                         else 
1461-                         { 
1462-                             var  priorityScore  =  metaResults . Metadata . Priority  *  150 ; 
1463-                             result . Score  +=  _userSelectedRecord . GetSelectedCount ( result )  +  priorityScore ; 
1464-                         } 
1456+                         result . Score  =  int . MaxValue ; 
1457+                     } 
1458+                     else 
1459+                     { 
1460+                         var  priorityScore  =  metaResults . Metadata . Priority  *  150 ; 
1461+                         result . Score  +=  _userSelectedRecord . GetSelectedCount ( result )  +  priorityScore ; 
14651462                    } 
14661463                } 
1467- 
1468-                 // it should be the same for all results 
1469-                 bool  reSelect  =  resultsForUpdates . First ( ) . ReSelectFirstResult ; 
1470- 
1471-                 Results . AddResults ( resultsForUpdates ,  token ,  reSelect ) ; 
1472-             } 
1473-             catch  ( Exception  ex ) 
1474-             { 
1475-                 Log . Debug ( "MainViewModel" ,  $ "Error in UpdateResultView: { ex . Message } ") ; 
14761464            } 
14771465
1478-             
1466+             // it should be the same for all results 
1467+             bool  reSelect  =  resultsForUpdates . First ( ) . ReSelectFirstResult ; 
1468+ 
1469+             Results . AddResults ( resultsForUpdates ,  token ,  reSelect ) ; 
14791470        } 
14801471
14811472        #endregion
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments