Skip to content

Commit

Permalink
sync flow mode initiate (#467)
Browse files Browse the repository at this point in the history
* sync flow mode initiate

* rebase to bring in the readme changes
  • Loading branch information
xavluiz authored Oct 13, 2023
1 parent a6a9cca commit ac1fea2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swdc-vscode",
"displayName": "Code Time",
"version": "2.7.2",
"version": "2.7.3",
"publisher": "softwaredotcom",
"description": "Code Time is an open source plugin that provides programming metrics right in Visual Studio Code.",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/managers/FlowManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function initiateFlow({automated = false}) {
const flowEnabled = isFlowModeEnabled();
if (primary && !flowEnabled) {
logIt('Entering Flow Mode');
await appPost('/plugin/flow_sessions', {automated});
await appPost('/plugin/flow_sessions', { automated: automated });
// only update flow change here
inFlowLocally = true;
updateFlowChange(true);
Expand Down
1 change: 0 additions & 1 deletion src/notifications/endOfDay.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {commands, window} from 'vscode';
import {showDashboard} from '../managers/WebViewManager';
import {getItem} from '../Util';
import {configureSettings} from '../managers/ConfigManager';
import {TrackerManager} from '../managers/TrackerManager';
import {format, startOfDay, differenceInMilliseconds} from 'date-fns';
Expand Down
8 changes: 5 additions & 3 deletions src/websockets.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api_endpoint } from './Constants';
import { getItem, getPluginId, getPluginName, getVersion, getOs, getOffsetSeconds, getPluginUuid, logIt, getRandomNumberWithinRange } from './Util';
import { getItem, getPluginId, getPluginName, getVersion, getOs, getOffsetSeconds, getPluginUuid, logIt, getRandomNumberWithinRange, isPrimaryWindow } from './Util';
import { handleFlowScoreMessage } from './message_handlers/flow_score';
import { handleAuthenticatedPluginUser } from './message_handlers/authenticated_plugin_user';
import { handleIntegrationConnectionSocketEvent } from './message_handlers/integration_connection';
Expand Down Expand Up @@ -219,8 +219,10 @@ const handleIncomingMessage = (data: any) => {

switch (message.type) {
case 'flow_score':
try { logIt(`Flow score: ${JSON.stringify(message.body.flowScore)}`) } catch (e) { }
handleFlowScoreMessage(message);
if (isPrimaryWindow()) {
try { logIt(`Flow score: ${JSON.stringify(message.body.flowScore)}`) } catch (e) { }
handleFlowScoreMessage(message);
}
break;
case 'flow_state':
try { logIt(`Flow state: ${JSON.stringify(message.body)}`) } catch (e) { }
Expand Down
Binary file removed swdc-vscode-2.7.1.vsix
Binary file not shown.
Binary file renamed swdc-vscode-2.7.2.vsix → swdc-vscode-2.7.3.vsix
Binary file not shown.

0 comments on commit ac1fea2

Please sign in to comment.