electron-97: refactored the code as per the ticket (points 3 & 4 covered)

This commit is contained in:
Vishwas Shashidhar
2017-08-24 16:18:32 +05:30
parent 28bd9399aa
commit 5f557247a7
20 changed files with 347 additions and 46 deletions

View File

@@ -10,6 +10,10 @@ const maxCount = 1e8;
const log = require('./log.js');
const logLevels = require('./enums/logLevels.js');
/**
* Shows the badge count
* @param count
*/
function show(count) {
if (typeof count !== 'number') {
log.send(logLevels.WARN, 'badgeCount: invalid func arg, must be a number: ' + count);
@@ -37,6 +41,11 @@ function show(count) {
}
}
/**
* Sets the data url
* @param dataUrl
* @param count
*/
function setDataUrl(dataUrl, count) {
const mainWindow = windowMgr.getMainWindow();
if (mainWindow && dataUrl && count) {