Ver a proveniência

Un-nests ifs

main
Eric Amodio há 1 ano
ascendente
cometimento
044887bf00
2 ficheiros alterados com 7 adições e 11 eliminações
  1. +5
    -7
      src/plus/webviews/graph/graphWebview.ts
  2. +2
    -4
      src/plus/webviews/timeline/timelineWebview.ts

+ 5
- 7
src/plus/webviews/graph/graphWebview.ts Ver ficheiro

@ -753,13 +753,11 @@ export class GraphWebviewProvider implements WebviewProvider {
}
private onThemeChanged(theme: ColorTheme) {
if (this._theme != null) {
if (
(isDarkTheme(theme) && isDarkTheme(this._theme)) ||
(isLightTheme(theme) && isLightTheme(this._theme))
) {
return;
}
if (
this._theme != null &&
((isDarkTheme(theme) && isDarkTheme(this._theme)) || (isLightTheme(theme) && isLightTheme(this._theme)))
) {
return;
}
this._theme = theme;

+ 2
- 4
src/plus/webviews/timeline/timelineWebview.ts Ver ficheiro

@ -223,10 +223,8 @@ export class TimelineWebviewProvider implements WebviewProvider {
if (e.data == null) return;
let uri: Uri | undefined = e.data.uri;
if (uri != null) {
if (!this.container.git.isTrackable(uri)) {
uri = undefined;
}
if (uri != null && !this.container.git.isTrackable(uri)) {
uri = undefined;
}
if (!this.updatePendingUri(uri)) return;

Carregando…
Cancelar
Guardar