mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Electron 32 (Activity Detection) (#71)
* Implemented user activity detection * ELECTRON-32: Implemented throttle function * ELECTRON-32: Fixed some bugs in throttle function * ELECTRON-32: Updated comments * ELECTRON-32: Fixed clear interval bug * ELECTRON-32: Updated as per the review * ELECTRON-32: Updated return statement * ELECTRON-32: Added a boolean to the callback function * ELECTRON-32: Resolved conflicts * ELECTRON-32 - Added period attribute
This commit is contained in:
@@ -8,6 +8,7 @@ const electron = require('electron');
|
||||
|
||||
const windowMgr = require('./windowMgr.js');
|
||||
const log = require('./log.js');
|
||||
const activityDetection = require('./activityDetection/activityDetection');
|
||||
const badgeCount = require('./badgeCount.js');
|
||||
|
||||
const apiEnums = require('./enums/api.js');
|
||||
@@ -87,11 +88,16 @@ electron.ipcMain.on(apiName, (event, arg) => {
|
||||
// renderer window that has a registered logger from JS.
|
||||
log.setLogWindow(event.sender);
|
||||
}
|
||||
|
||||
if (arg.cmd === apiCmds.registerActivityDetection) {
|
||||
// renderer window that has a registered activity detection from JS.
|
||||
activityDetection.setActivityWindow(arg.period, event.sender);
|
||||
}
|
||||
});
|
||||
|
||||
// expose these methods primarily for testing...
|
||||
module.exports = {
|
||||
shouldCheckValidWindow: function(shouldCheck) {
|
||||
shouldCheckValidWindow: function (shouldCheck) {
|
||||
checkValidWindow = shouldCheck;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user