Skip to content

Commit

Permalink
bug on hiding/displaying timer
Browse files Browse the repository at this point in the history
  • Loading branch information
afractal committed Sep 5, 2017
1 parent cabda14 commit 24be506
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@

## Changes

*v.0.2.0*
*v.0.2.\**

- add and integrate taskboard with timer
- add pomodori counter for tasks
- bug on hiding/displaying timer
- bug on removing the current task, it should be removed from the timer

*v0.1.0*
*v0.1.\**

- add basic pomodoro timer functionality

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pomotimer",
"displayName": "PomoTimer",
"description": "Fancy pomodoro timer in your status bar.",
"version": "0.2.0",
"version": "0.2.1",
"publisher": "afractal",
"license": "MIT",
"homepage": "https://github.com/afractal/PomoTimer",
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const createApp = async (context: ExtensionContext) => {

context.subscriptions.push(
displayTaskboardCommand(taskboadComponent),
displayTimerCommand(timerComponent),
displayTimerCommand(timerComponent, currentTaskComponent),
startTimerCommand(timerComponent, currentTaskComponent, taskboadComponent),
pauseTimerCommand(timerComponent),
resumeTimerCommand(timerComponent),
Expand Down
5 changes: 4 additions & 1 deletion src/commands/display-timer-command.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { commands } from 'vscode';
import { Commands } from '../types/command-defs';
import { TimerComponent } from '../timer-component';
import { CurrentTaskComponent } from '../current-task-component';

export const displayTimerCommand = (timerComponent: TimerComponent) => {
export const displayTimerCommand = (timerComponent: TimerComponent,
currentTaskComponent: CurrentTaskComponent) => {
return commands.registerCommand(Commands.DisplayTimer, async () => {
timerComponent.displayTimer();
currentTaskComponent.displayCurrentTask();
});
};
4 changes: 3 additions & 1 deletion src/current-task-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export class CurrentTaskComponent extends EventEmitter {
set statusBarSelectedTask(value) { this._statusBarSelectedTask = value; }

displayCurrentTask() {
this.statusBarSelectedTask.show();
if (this.selectedTask) {
this.statusBarSelectedTask.show();
}
}

hideCurrentTask() {
Expand Down

0 comments on commit 24be506

Please sign in to comment.