Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd23f0a

Browse files
committed
add in destroy and terminatePendingState as default
1 parent c76a00d commit dd23f0a

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

lib/items/changed-file-item.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,6 @@ export default class ChangedFileItem extends ItemComponent {
4848
return title;
4949
}
5050

51-
terminatePendingState() {
52-
if (!this.hasTerminatedPendingState) {
53-
this.emitter.emit('did-terminate-pending-state');
54-
this.hasTerminatedPendingState = true;
55-
}
56-
}
57-
58-
onDidTerminatePendingState(callback) {
59-
return this.emitter.on('did-terminate-pending-state', callback);
60-
}
61-
6251
render() {
6352
const repository = this.props.workdirContextPool.getContext(this.props.workingDirectory).getRepository();
6453

lib/items/github-tab-item.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,12 @@ export default class GitHubTabItem extends ItemComponent {
6060
restoreFocus() {
6161
// No-op
6262
}
63+
64+
destroy() {
65+
return false;
66+
}
67+
68+
terminatePendingState() {
69+
return false;
70+
}
6371
}

lib/items/item-component.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ export default class ItemComponent extends React.Component {
3838
return this.emitter.on('did-destroy', callback);
3939
}
4040

41+
terminatePendingState() {
42+
if (!this.hasTerminatedPendingState) {
43+
this.emitter.emit('did-terminate-pending-state');
44+
this.hasTerminatedPendingState = true;
45+
}
46+
}
47+
48+
onDidTerminatePendingState(callback) {
49+
return this.emitter.on('did-terminate-pending-state', callback);
50+
}
51+
4152
serialize() {
4253
return {};
4354
}

0 commit comments

Comments
 (0)