Skip to content

Commit

Permalink
Add services
Browse files Browse the repository at this point in the history
  • Loading branch information
SRichner committed Feb 16, 2024
1 parent 4a00d1d commit a3e4ed3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/electron/electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { TrackerType } from '../enums/TrackerType.enum';
import { WindowActivityTrackerService } from './services/trackers/WindowActivityTrackerService';
import { UserInputTrackerService } from './services/trackers/UserInputTrackerService';
import { TrackerService } from './services/trackers/TrackerService';
import AppUpdaterService from './services/AppUpdaterService';
import { WindowService } from './services/WindowService';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand All @@ -24,6 +26,8 @@ process.env.VITE_PUBLIC = process.env.VITE_DEV_SERVER_URL

const databaseService: DatabaseService = new DatabaseService();
const settingsService: SettingsService = new SettingsService();
const appUpdaterService: AppUpdaterService = new AppUpdaterService();
const windowService: WindowService = new WindowService(appUpdaterService);

// Disable GPU Acceleration for Windows 7
if (release().startsWith('6.1')) {
Expand Down Expand Up @@ -78,6 +82,9 @@ app.whenReady().then(async () => {

await databaseService.init();
await settingsService.init();
await windowService.init();
await appUpdaterService.checkForUpdates({ silent: true });
appUpdaterService.startCheckForUpdatesInterval();

const trackers: TrackerService = new TrackerService(studyConfig.trackers);
await trackers.registerTrackerCallback(
Expand Down

0 comments on commit a3e4ed3

Please sign in to comment.