Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class AppIconChangerModule(

@ReactMethod
fun getActiveIcon(promise: Promise) {
val activity: Activity? = currentActivity
val activity: Activity? = reactApplicationContext.currentActivity
if (activity == null) {
promise.reject("ACTIVITY_NOT_FOUND", "Activity was not found")
return
Expand Down Expand Up @@ -127,7 +127,7 @@ class AppIconChangerModule(
isChangingIcon = true

try {
val activity = currentActivity
val activity = reactApplicationContext.currentActivity
if (activity == null) {
Log.w(TAG, "Activity is null, cannot complete icon change")
return
Expand Down Expand Up @@ -177,7 +177,7 @@ class AppIconChangerModule(
@ReactMethod
@Synchronized
fun setIcon(iconName: String?, promise: Promise) {
val activity = currentActivity
val activity = reactApplicationContext.currentActivity
if (activity == null) {
promise.reject("ACTIVITY_NOT_FOUND", "The activity is null. Check if the app is running properly.")
return
Expand Down