-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] OS Notification on update downloaded and minor refactor #194
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlphaStyle Sorry for taking a bit long to get back to you. I just tried your PR, please see my comments below. Thanks! :)
@@ -185,6 +185,7 @@ function setInitialValues() { | |||
language: 'en', | |||
sound: 'default', | |||
muted: false, | |||
notification: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not necessary. The notification should always be on, don't you think?
const appConfig = require('electron-settings'); | ||
|
||
const Notify = options => { | ||
const permission = appConfig.get('general.notification'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also should remove the conditional check here
@@ -69,6 +71,7 @@ autoUpdater.on('download-progress', progressObj => { | |||
|
|||
// Update Downloaded | |||
autoUpdater.on('update-downloaded', info => { | |||
Notify({ title: 'Manta Update', body: 'Updates has been downloaded' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs translation. Please refers to PR #187 for implementation detail of i18next
@@ -239,6 +240,7 @@ function migrateData() { | |||
language: appSettings.language, | |||
sound: appSettings.sound, | |||
muted: appSettings.muted, | |||
notification: appSettings.notification, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this is actually not needed as notification
is a new value.
This should be an easy fix and I figured it would be easier to make a new PR, plus I haven't heard back from you so I'm closing this in favour of #201. |
I am sorry for not responding! I know it is somewhat rude to start a PR and then dont follow up, and I appolegies for this. Most of the time I can only code during the weekends. |
@AlphaStyle Don't worry, it's all good. I understand :) |
fix 165
Enabling and disabling OS Notification requires restart.
Moved
center-on-primary-display.js
andnotify.js
to a sharedhelpers
folder in the root directory.@hql287 Could you test if this actually works? Anything you would like to improve?