Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing commit and amend widgets on opening new workspace #7769

Merged
merged 1 commit into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions packages/scm/src/browser/scm-amend-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
********************************************************************************/

import { injectable, inject } from 'inversify';
import { Message } from '@phosphor/messaging';
import { SelectionService } from '@theia/core/lib/common';
import * as React from 'react';
import {
Expand Down Expand Up @@ -51,13 +50,6 @@ export class ScmAmendWidget extends ReactWidget {
this.id = ScmAmendWidget.ID;
}

protected onUpdateRequest(msg: Message): void {
if (!this.isAttached || !this.isVisible) {
return;
}
super.onUpdateRequest(msg);
}

protected render(): React.ReactNode {
const repository = this.scmService.selectedRepository;
if (repository && repository.provider.amendSupport) {
Expand Down
12 changes: 1 addition & 11 deletions packages/scm/src/browser/scm-commit-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

import { injectable, inject } from 'inversify';
import { Message } from '@phosphor/messaging';
import { SelectionService } from '@theia/core/lib/common';
import * as React from 'react';
import TextareaAutosize from 'react-autosize-textarea';
import { ScmInput } from './scm-input';
import {
ContextMenuRenderer, ReactWidget, LabelProvider, KeybindingRegistry, StatefulWidget} from '@theia/core/lib/browser';
ContextMenuRenderer, ReactWidget, KeybindingRegistry, StatefulWidget} from '@theia/core/lib/browser';
import { ScmService } from './scm-service';

@injectable()
Expand All @@ -30,8 +29,6 @@ export class ScmCommitWidget extends ReactWidget implements StatefulWidget {
static ID = 'scm-commit-widget';

@inject(ScmService) protected readonly scmService: ScmService;
@inject(SelectionService) protected readonly selectionService: SelectionService;
@inject(LabelProvider) protected readonly labelProvider: LabelProvider;
@inject(KeybindingRegistry) protected readonly keybindings: KeybindingRegistry;

protected shouldScrollToRow = true;
Expand Down Expand Up @@ -60,13 +57,6 @@ export class ScmCommitWidget extends ReactWidget implements StatefulWidget {
(this.inputRef.current || this.node).focus();
}

protected onUpdateRequest(msg: Message): void {
if (!this.isAttached || !this.isVisible) {
return;
}
super.onUpdateRequest(msg);
}

protected render(): React.ReactNode {
const repository = this.scmService.selectedRepository;
if (repository) {
Expand Down
3 changes: 0 additions & 3 deletions packages/scm/src/browser/scm-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ export class ScmWidget extends BaseWidget implements StatefulWidget {
}

protected onUpdateRequest(msg: Message): void {
if (!this.isAttached || !this.isVisible) {
return;
}
MessageLoop.sendMessage(this.commitWidget, msg);
MessageLoop.sendMessage(this.resourceWidget, msg);
MessageLoop.sendMessage(this.amendWidget, msg);
Expand Down