File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -1499,9 +1499,28 @@ public void UpdateResultView(ICollection<ResultsForUpdate> resultsForUpdates)
1499
1499
else
1500
1500
{
1501
1501
var priorityScore = metaResults . Metadata . Priority * 150 ;
1502
- result . Score += result . AddSelectedCount ?
1503
- _userSelectedRecord . GetSelectedCount ( result ) + priorityScore :
1504
- priorityScore ;
1502
+ if ( result . AddSelectedCount )
1503
+ {
1504
+ if ( ( long ) result . Score + _userSelectedRecord . GetSelectedCount ( result ) + priorityScore > Result . MaxScore )
1505
+ {
1506
+ result . Score = Result . MaxScore ;
1507
+ }
1508
+ else
1509
+ {
1510
+ result . Score += _userSelectedRecord . GetSelectedCount ( result ) + priorityScore ;
1511
+ }
1512
+ }
1513
+ else
1514
+ {
1515
+ if ( ( long ) result . Score + priorityScore > Result . MaxScore )
1516
+ {
1517
+ result . Score = Result . MaxScore ;
1518
+ }
1519
+ else
1520
+ {
1521
+ result . Score += priorityScore ;
1522
+ }
1523
+ }
1505
1524
}
1506
1525
}
1507
1526
}
You can’t perform that action at this time.
0 commit comments