|
| 1 | +diff --git a/android/src/main/java/expo/modules/widgets/WidgetsModule.kt b/android/src/main/java/expo/modules/widgets/WidgetsModule.kt |
| 2 | +index f947f46..d290055 100644 |
| 3 | +--- a/android/src/main/java/expo/modules/widgets/WidgetsModule.kt |
| 4 | ++++ b/android/src/main/java/expo/modules/widgets/WidgetsModule.kt |
| 5 | +@@ -84,6 +84,11 @@ class WidgetsModule : Module() { |
| 6 | + } |
| 7 | + |
| 8 | + Class("CustomNotification", CustomNotification::class) { |
| 9 | ++ // A SharedObject class without a constructor fails module registration at launch. |
| 10 | ++ Constructor { -> |
| 11 | ++ throw UnsupportedOperationException("CustomNotification instances come from CustomNotificationFactory") |
| 12 | ++ } |
| 13 | ++ |
| 14 | + Function("getId") { notification: CustomNotification -> |
| 15 | + notification.id |
| 16 | + } |
| 17 | +diff --git a/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationBuilder.kt b/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationBuilder.kt |
| 18 | +index 07eca41..82cabea 100644 |
| 19 | +--- a/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationBuilder.kt |
| 20 | ++++ b/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationBuilder.kt |
| 21 | +@@ -14,8 +14,8 @@ import android.os.Bundle |
| 22 | + import androidx.core.app.NotificationCompat |
| 23 | + import androidx.core.app.NotificationManagerCompat |
| 24 | + import expo.modules.widgets.R |
| 25 | +-import io.github.jakex7.peek.notification.PeekNotificationViews |
| 26 | +-import io.github.jakex7.peek.notification.setPeekContent |
| 27 | ++import io.github.expo.peek.notification.PeekNotificationViews |
| 28 | ++import io.github.expo.peek.notification.setPeekContent |
| 29 | + |
| 30 | + internal object CustomNotificationBuilder { |
| 31 | + private const val DEFAULT_CHANNEL_ID = "expo_widgets_notifications" |
| 32 | +diff --git a/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationRenderer.kt b/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationRenderer.kt |
| 33 | +index 446a39e..e90b09a 100644 |
| 34 | +--- a/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationRenderer.kt |
| 35 | ++++ b/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationRenderer.kt |
| 36 | +@@ -8,9 +8,9 @@ import expo.modules.widgets.WidgetsStorage |
| 37 | + import expo.modules.widgets.evaluateLayout |
| 38 | + import expo.modules.widgets.getWidgetEnvironment |
| 39 | + import expo.modules.widgets.toPeekRoot |
| 40 | +-import io.github.jakex7.peek.emittables.peekEmittableNotificationViews |
| 41 | +-import io.github.jakex7.peek.notification.PeekNotificationSizes |
| 42 | +-import io.github.jakex7.peek.notification.PeekNotificationViews |
| 43 | ++import io.github.expo.peek.emittables.peekEmittableNotificationViews |
| 44 | ++import io.github.expo.peek.notification.PeekNotificationSizes |
| 45 | ++import io.github.expo.peek.notification.PeekNotificationViews |
| 46 | + |
| 47 | + internal object CustomNotificationRenderer { |
| 48 | + suspend fun render(context: Context, state: CustomNotificationState): PeekNotificationViews { |
| 49 | +diff --git a/android/src/main/java/expo/modules/widgets/notifications/CustomNotifications.kt b/android/src/main/java/expo/modules/widgets/notifications/CustomNotifications.kt |
| 50 | +index a7b372e..dd001ee 100644 |
| 51 | +--- a/android/src/main/java/expo/modules/widgets/notifications/CustomNotifications.kt |
| 52 | ++++ b/android/src/main/java/expo/modules/widgets/notifications/CustomNotifications.kt |
| 53 | +@@ -3,7 +3,7 @@ package expo.modules.widgets.notifications |
| 54 | + import android.annotation.SuppressLint |
| 55 | + import android.content.Context |
| 56 | + import androidx.core.app.NotificationManagerCompat |
| 57 | +-import io.github.jakex7.peek.notification.PeekNotificationViews |
| 58 | ++import io.github.expo.peek.notification.PeekNotificationViews |
| 59 | + import kotlinx.coroutines.CancellationException |
| 60 | + import kotlinx.coroutines.Job |
| 61 | + import kotlinx.coroutines.coroutineScope |
1 | 62 | diff --git a/build/Widgets.types.d.ts b/build/Widgets.types.d.ts |
2 | 63 | index 4c474bb..b0173df 100644 |
3 | 64 | --- a/build/Widgets.types.d.ts |
|
0 commit comments