skb1129 / react-native-change-icon

Change your application icon programmatically for React Native apps
MIT License
500 stars 91 forks source link

fix: change ArrayList to HashSet in android module #95

Closed rlsmd9 closed 1 year ago

rlsmd9 commented 1 year ago

Hi, I have a suggestion!

It seems that the version increase of react-native-change-icon to 5.0.0, the following code was added, and it's causing the app to finish every time changeIcon is called

https://github.com/skb1129/react-native-change-icon/blob/d3a945159aa9fab3f79da9b6419b55eeac6bea97/android/src/main/java/com/reactnativechangeicon/ChangeIconModule.java#L89-L96

And, there appears to be an issue with the logic to disable components in the Android Module. For example, when switching between A (aliased-activity) and B (aliased-activity) repeatedly, it seems that both Alias-Activities are being disabled in the ArrayList (when activity.finish() is removed).

So, I tried modifying the code like in this PR. What do you think?

skb1129 commented 1 year ago

Thanks a lot @ralph-101-dev