Skip to content

Commit

Permalink
3.6.2 online time fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MayGo committed Jan 22, 2020
1 parent 96c2604 commit 92f5d20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions client/src/components/TrayLayout/TrayMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export const TrayMenu = () => {
};

useEffect(() => {
const systemIsOnline = date => {
Logger.debug('system-is-online', date);
setOnlineSince(date ? date : getNow());
const systemIsOnline = () => {
Logger.debug('system-is-online');
setOnlineSince(getNow());
};
const systemIsNotOnline = () => {
Logger.debug('system-is-not-online');
Expand Down
3 changes: 2 additions & 1 deletion electron/app/API.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { settingsService } from './services/settings-service';
import { appSettingService } from './services/app-setting-service';
import { trackItemService } from './services/track-item-service';
import { stateManager } from './state-manager';
import { State } from './enums/state';

const settingsActions = {
fetchAnalyserSettingsJsonString: async (req, res) => {
Expand Down Expand Up @@ -73,7 +74,7 @@ const trackItemActions = {
getOnlineStartTime: async (req, res) => {
const statusItem = stateManager.getCurrentStatusTrackItem();

res.send(statusItem ? statusItem.beginDate : null);
res.send(statusItem && statusItem.app === State.Online ? statusItem.beginDate : null);
},
};

Expand Down

0 comments on commit 92f5d20

Please sign in to comment.