-
Notifications
You must be signed in to change notification settings - Fork 120
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
Native Notifications [WIP] #462
base: master
Are you sure you want to change the base?
Conversation
import kotlin.native.concurrent.freeze | ||
|
||
internal actual suspend fun sendNotification(notification: Notification) { | ||
val nc = UNUserNotificationCenter.currentNotificationCenter().freeze() |
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.
No need to freeze here, this is Objective-C object.
@@ -11,7 +11,7 @@ import kotlin.math.sin | |||
import kotlin.math.PI | |||
import kotlin.math.pow | |||
|
|||
class Clocks(private val layer: SkiaLayer): SkikoView { | |||
open class Clocks(private val layer: SkiaLayer): SkikoView { |
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.
Why this change?
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.
Temporarily opened to add custom key binding for macOS
super.onKeyboardEvent(event) | ||
if (event.kind == SkikoKeyboardEventKind.DOWN) when (event.key) { | ||
SkikoKey.KEY_N -> runBlocking { | ||
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.
Hmm, why runBlocking
? Cannot we just run it as suspend on SkikoDispatchers.Main
dispatcher?
import platform.Foundation.NSMakeRect | ||
import platform.Foundation.NSSelectorFromString | ||
import platform.darwin.NSObject | ||
import org.jetbrains.skiko.notifications.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.
Not sure if notifications deserve their own package.
No description provided.