Skip to content

Commit 8f12491

Browse files
committed
fix live update and live activities on oldArch
1 parent 94437cc commit 8f12491

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

android/src/main/java/com/urbanairship/reactnative/AirshipModule.kt

+11
Original file line numberDiff line numberDiff line change
@@ -713,36 +713,42 @@ class AirshipModule internal constructor(val context: ReactApplicationContext) :
713713
}
714714
}
715715

716+
@ReactMethod
716717
override fun liveActivityListAll(promise: Promise) {
717718
promise.resolveResult {
718719
throw IllegalStateException("Not supported on Android")
719720
}
720721
}
721722

723+
@ReactMethod
722724
override fun liveActivityList(request: ReadableMap?, promise: Promise) {
723725
promise.resolveResult {
724726
throw IllegalStateException("Not supported on Android")
725727
}
726728
}
727729

730+
@ReactMethod
728731
override fun liveActivityStart(request: ReadableMap?, promise: Promise) {
729732
promise.resolveResult {
730733
throw IllegalStateException("Not supported on Android")
731734
}
732735
}
733736

737+
@ReactMethod
734738
override fun liveActivityUpdate(request: ReadableMap?, promise: Promise) {
735739
promise.resolveResult {
736740
throw IllegalStateException("Not supported on Android")
737741
}
738742
}
739743

744+
@ReactMethod
740745
override fun liveActivityEnd(request: ReadableMap?, promise: Promise) {
741746
promise.resolveResult {
742747
throw IllegalStateException("Not supported on Android")
743748
}
744749
}
745750

751+
@ReactMethod
746752
override fun liveUpdateListAll(promise: Promise) {
747753
promise.resolveSuspending(scope) {
748754
proxy.liveUpdateManager.listAll().let {
@@ -751,6 +757,7 @@ class AirshipModule internal constructor(val context: ReactApplicationContext) :
751757
}
752758
}
753759

760+
@ReactMethod
754761
override fun liveUpdateList(request: ReadableMap?, promise: Promise) {
755762
promise.resolveSuspending(scope) {
756763
proxy.liveUpdateManager.list(
@@ -761,6 +768,7 @@ class AirshipModule internal constructor(val context: ReactApplicationContext) :
761768
}
762769
}
763770

771+
@ReactMethod
764772
override fun liveUpdateStart(request: ReadableMap?, promise: Promise) {
765773
promise.resolveSuspending(scope) {
766774
proxy.liveUpdateManager.start(
@@ -769,6 +777,7 @@ class AirshipModule internal constructor(val context: ReactApplicationContext) :
769777
}
770778
}
771779

780+
@ReactMethod
772781
override fun liveUpdateUpdate(request: ReadableMap?, promise: Promise) {
773782
promise.resolveSuspending(scope) {
774783
proxy.liveUpdateManager.update(
@@ -777,6 +786,7 @@ class AirshipModule internal constructor(val context: ReactApplicationContext) :
777786
}
778787
}
779788

789+
@ReactMethod
780790
override fun liveUpdateEnd(request: ReadableMap?, promise: Promise) {
781791
promise.resolveSuspending(scope) {
782792
proxy.liveUpdateManager.end(
@@ -785,6 +795,7 @@ class AirshipModule internal constructor(val context: ReactApplicationContext) :
785795
}
786796
}
787797

798+
@ReactMethod
788799
override fun liveUpdateClearAll(promise: Promise) {
789800
promise.resolveSuspending(scope) {
790801
proxy.liveUpdateManager.clearAll()

0 commit comments

Comments
 (0)