Skip to content

Conversation

@tesh254
Copy link

@tesh254 tesh254 commented Dec 31, 2021

What does this PR do?

  • contains a new method called isBubbleOpen

Why this PR?

My previous experience with the existing methods worked fine until I decided to launch the bubble in the useEffect. This ended up spawning multiple bubbles on launch. I tried the hideFloatingBubble method but it only closed the recent bubble opened and not the others. So I introduced this method that checks for an open before opening a new one.

How can this be manually tested?

import {
  showFloatingBubble,
  isBubbleOpen,
} from "react-native-floating-bubble";

async function showBubble() {
    try {
      const _isBubbleOpen = await isBubbleOpen();

      if (!_isBubbleOpen) {
        await showFloatingBubble();
      }
    } catch (error) {
      console.log(error);
    }
}

Copy link

@MuhammadAasharibNawshad MuhammadAasharibNawshad left a comment

Choose a reason for hiding this comment

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

Good to go.

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.

2 participants