Skip to content

Commit

Permalink
refactor: rename titleContext to context
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphclue committed Aug 24, 2021
1 parent 32bd4fa commit b7e746f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/com.morphclue.wakatime.sdPlugin/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let websocket = null;
let pluginUUID = null;
let settings = null;
let titleContext = null;
let context = null;
let remainingMinutes = 0;
let timerId;

Expand All @@ -21,7 +21,7 @@ function handleMessage(event) {
switch (eventObject['event']) {
case 'willAppear':
console.log('Stream-Deck appeared');
titleContext = eventObject.context;
context = eventObject.context;
fetchWakaTimeStats();
break;
case 'willDisappear':
Expand Down Expand Up @@ -87,7 +87,7 @@ function startTimer() {
function showAlert() {
const json = {
"event": "showAlert",
"context": titleContext,
"context": context,
};

websocket.send(JSON.stringify(json));
Expand All @@ -112,7 +112,7 @@ function unregisterPlugin(event) {
function setTitle(title) {
const json = {
"event": "setTitle",
"context": titleContext,
"context": context,
"payload": {
"title": "" + title,
"target": 0
Expand Down

0 comments on commit b7e746f

Please sign in to comment.