Skip to content

Conversation

@RZulfikri
Copy link

this PR is related to this issue #135.

allow to update delegate every time attachViewDelegate called.
@Rob117
Copy link

Rob117 commented Nov 25, 2021

I tested this and it seems to work!

@levino
Copy link

levino commented Apr 6, 2022

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

@xmflsct
Copy link

xmflsct commented May 3, 2022

It is working!

xmflsct added a commit to tooot-app/app that referenced this pull request May 4, 2022
@kristi-gjeka
Copy link

Please merge this PR

@p-gag
Copy link

p-gag commented Jun 7, 2022

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

1 similar comment
@p-gag
Copy link

p-gag commented Jun 7, 2022

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


public static func attachViewDelegate(_ delegate: ReactShareViewDelegate!) {
guard (ShareMenuReactView.viewDelegate == nil) else { return }
// guard (ShareMenuReactView.viewDelegate == nil) else { return }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fix the listener?

oniOS I check initialShare on view because the listener doesn't fire

ryanlntn added a commit to infinitered/ExpensifyApp that referenced this pull request Aug 25, 2023
ryanlntn added a commit to infinitered/ExpensifyApp that referenced this pull request Aug 31, 2023
ryanlntn added a commit to infinitered/ExpensifyApp that referenced this pull request Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants