Преглед на файлове

Fixes #2069 uses unified lookup table for opacity

main
Eric Amodio преди 2 години
родител
ревизия
ecd4ff87f3
променени са 2 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. +1
    -0
      CHANGELOG.md
  2. +4
    -2
      src/annotations/blameAnnotationProvider.ts

+ 1
- 0
CHANGELOG.md Целия файл

@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#2069](https://github.com/gitkraken/vscode-gitlens/issues/2069) - Heatmap - incorrect behavior of gitlens.heatmap.fadeLines with gitlens.heatmap.ageThreshold
- Fixes [#2048](https://github.com/gitkraken/vscode-gitlens/issues/2048) - Gitlens not loading in vscode.dev
- Fixes an issue where the _Stashes_ view empty state isn't displayed properly when there are no stashes

+ 4
- 2
src/annotations/blameAnnotationProvider.ts Целия файл

@ -98,9 +98,11 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
lookupTable = getRelativeAgeLookupTable(dates);
}
const getLookupTable = (date: Date) =>
const getLookupTable = (date: Date, unified?: boolean) =>
Array.isArray(lookupTable)
? lookupTable
: unified
? lookupTable.hot.concat(lookupTable.cold)
: date.getTime() < coldThresholdTimestamp
? lookupTable.cold
: lookupTable.hot;
@ -121,7 +123,7 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
colors: await getHeatmapColors(),
computeRelativeAge: (date: Date) => computeRelativeAge(date, getLookupTable(date)),
computeOpacity: (date: Date) => {
const lookup = getLookupTable(date);
const lookup = getLookupTable(date, true);
const age = computeRelativeAge(date, lookup);
return Math.max(0.2, Math.round((1 - age / lookup.length) * 100) / 100);

Зареждане…
Отказ
Запис