react-native-share-menu icon indicating copy to clipboard operation
react-native-share-menu copied to clipboard

allow to update delegate every time attachViewDelegate called.

Open RZulfikri opened this issue 3 years ago • 6 comments

this PR is related to this issue https://github.com/meedan/react-native-share-menu/issues/135.

RZulfikri avatar Oct 20 '21 15:10 RZulfikri

I tested this and it seems to work!

Rob117 avatar Nov 25 '21 00:11 Rob117

Me too. Please merge. However I would prefer to delete the line instead of commenting it out.

levino avatar Apr 06 '22 08:04 levino

It is working!

xmflsct avatar May 03 '22 19:05 xmflsct

Please merge this PR

kristi-gjeka avatar May 09 '22 14:05 kristi-gjeka

Maybe if it can help someone. Here are some details...

The lib is composed of

  1. A derivation of UIViewController, an apple primitive to present things. This is an instance.
  2. A single static object to expose functions to react/java (which point to a single ViewController)

The lib takes one of the following wrong assumption:

  • Only 1 UIViewController exist at a given moment (not clear given the complexity of view system)
  • The system will always call viewDidDisappear (most likely the bug when switching app)

The ok-but-not-great fix is to comment or remove the guard as proposed. It clean the left over UIViewController instance in the static object. Ideally someone with experience with the lib would evaluate and fix it by finding the others path of cleanup (when switching app for example).

In time being patch-package can be your friend, it is simple to use:

https://dev.to/zhnedyalkow/the-easiest-way-to-patch-your-npm-package-4ece

p-gag avatar Jun 07 '22 21:06 p-gag

Maybe if it can help someone. Here are some details...

The lib is composed of

  1. A derivation of UIViewController, an apple primitive to present things. This is an instance.
  2. A single static object to expose functions to react/java (which point to a single ViewController)

The lib takes one of the following wrong assumption:

  • Only 1 UIViewController exist at a given moment (not clear given the complexity of view system)
  • The system will always call viewDidDisappear (most likely the bug when switching app)

The ok-but-not-great fix is to comment or remove the guard as proposed. It clean the left over UIViewController instance in the static object. Ideally someone with experience with the lib would evaluate and fix it by finding the others path of cleanup (when switching app for example).

In time being patch-package can be your friend, it is simple to use:

https://dev.to/zhnedyalkow/the-easiest-way-to-patch-your-npm-package-4ece

p-gag avatar Jun 07 '22 21:06 p-gag