-
Notifications
You must be signed in to change notification settings - Fork 414
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
Subscriptions overhaul #1872
Subscriptions overhaul #1872
Conversation
One weird thing about this @seanyesmunt I'm using the existing reducer |
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.
A few minor comments but looks good. Will need to do some testing before merging.
src/renderer/page/settings/view.jsx
Outdated
name="auto_download" | ||
onChange={this.onAutoDownloadChange} | ||
checked={autoDownload} | ||
postfix={__('Automatically download new content')} |
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 should reference that it is for subscriptions.
Automatically download new content from your subscriptions
? That might be a little long
dispatch( | ||
doNotify({ | ||
message: `'${fileInfo.metadata.title}' has been downloaded`, | ||
displayType: ['snackbar'], |
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 the idea behind snackbars is that they are reserved for user actions, which wouldn't make sense for this use case. Maybe we should create our own notification component that mimics desktop notifications but has some additional style.
Not needed for this PR but I think we should stick with the OS notifications for now.
@@ -26,6 +26,7 @@ const defaultState = { | |||
automaticDarkModeEnabled: getLocalStorageSetting(SETTINGS.AUTOMATIC_DARK_MODE_ENABLED, false), | |||
autoplay: getLocalStorageSetting(SETTINGS.AUTOPLAY, false), | |||
resultCount: Number(getLocalStorageSetting(SETTINGS.RESULT_COUNT, 50)), | |||
autoDownload: getLocalStorageSetting(SETTINGS.AUTO_DOWNLOAD, false), |
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 should default to true
. Users can turn it off if they want.
cd8f38d
to
2d8fb00
Compare
2d8fb00
to
d5e0883
Compare
Found one issue (still testing).
|
Possibly we should look at the date you subscribed to a channel, and if it is newer than that, then show the notification/download? Not sure. |
The badge 9/10 thing is because of how that number is calculated. It's the count of all notifications that are not |
I think that number is ok, but it should only show the badge if it's actually new content, not just the first page of content on an old channel that I subscribed to. In this case:
|
@seanyesmunt and I also discussed exposing the autodownload setting on the sub page too. Is autodownload on startup supposed to work with the hack? When I go into a claim I'm subbed to (and not downloaded), I see it starting to download automatically - is this intentional? We should incorporate the download limit as a setting if we are going to impose it. I think it would also work better as a per channel instead of across all subs setting. |
d5e0883
to
566bba3
Compare
Encountered this error running this branch:
|
2673dc6
to
d254065
Compare
…ions page; formatting
…msByChan; doFetchMySubs on startup; always set latest on checkSub; do not download or notify when latest is undefined
d254065
to
5e270c1
Compare
Epic #1861
SUBSCRIPTION_DOWNLOAD_LIMIT
from 1 to 3 and apply limit to total downloads rather than per-channel*redux-persist
's<PersistGate>
component/feature so actions are dispatched once redux has been rehydrated. This requires upgradingredux-persist
from version4.x
to5.x
. There is a migration guide.*As it was, the app would download the limit (1) for each channel which could be too much if a user is subscribed to many channels. One issue with this approach is that it will dispatch downloads in the order it iterates through subscriptions. To fix that would require calling all the endpoints, flattening the data, and choosing which ones to download. I found this to be a reasonable compromise for when a user opens the app and may have lots of new content available. Any new content that is prevented from downloading this way still creates a
NOTIFY_ONLY
notification, adding to the badge count next to Subscriptions. We may want to allow a user to determine the value ofSUBSCRIPTION_DOWNLOAD_LIMIT
.