-
Notifications
You must be signed in to change notification settings - Fork 324
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
Add notification manager for web #128
Conversation
@@ -82,11 +82,11 @@ fun SearchScreen( | |||
selectedTab = it | |||
} | |||
) | |||
Row(horizontalArrangement = Arrangement.End, modifier = Modifier.fillMaxWidth()) { | |||
Row(horizontalArrangement = Arrangement.Start, modifier = Modifier.fillMaxWidth()) { |
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.
It looks like it affects the mobile design as well. Should it be platform specific?
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.
btw. UI changes should not be related to the notification manager
actual fun requestPermission() { | ||
Notification.requestPermission { | ||
if (it == "granted") { | ||
notificationAllowed = 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.
Notification will be shown only on the first open, after reopen/refresh notificationAllowed
will be 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.
As far as I remember, it should be saved by the browser for a specific host
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.
But it's runtime value, and it will not be persisted between runs
actual class NotificationManager actual constructor( | ||
context: ApplicationContext | ||
) { | ||
private var notificationAllowed = 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.
It should be initialized using Notification.permission
Don't run workflow on PRs
* Don't use paths relative to root since on GitHub it's not located in the root * Remove non-existed files from urls to cache * Add missed files to urls to cache
Pushed Notification related things to the master without UI changes |
No description provided.