sekizlipenguen / react-native-popup-confirm-toast

MIT License
89 stars 12 forks source link

Shows a border gradient on android in release #16

Closed crstnmac closed 1 year ago

crstnmac commented 1 year ago

This issue doesn't appear in simulator, it happens in a physical device. Adding Root to Main function or any screens causes this.

Screenshot_2023-04-22-22-32-50-61_6b219cc4e2ae9f2fb8a14e4a0ee8b388~2.jpg

import { AppRegistry } from 'react-native';

import { name as appName } from './app.json';
import { App } from './src/app';
import { Root as PopupRootProvider } from 'react-native-popup-confirm-toast';

export default function Main() {
  return (
    <PopupRootProvider>
      <App />
    </PopupRootProvider>
  );
}

AppRegistry.registerComponent(appName, () => Main);

This function uses toast component, similarly Popup in other screens.

 const deleteMyAcc = (input: FormType) => {
    deleteAccount(
      {
        ...input,
      },
      {
        onSuccess: (s) => {
          Toast.show({
            type: 'success',
            title: 'Account Delete',
            textBody: 'Account deleted successfully',
            buttonText: 'OK',
            callback: () => Toast.hide(),
          });
          signOut();
          navigation.replace('Auth');
          console.log(s);
        },
        onError: (e) => {
          console.log(e.response?.data);
          showError(e);
        },
      }
    );
  };
crstnmac commented 1 year ago

@sekizlipenguen It also makes any buttons underneath the view unclickable

sapjax commented 1 year ago

same issue here

sekizlipenguen commented 1 year ago

@sekizlipenguen It also makes any buttons underneath the view unclickable

I have done fix for android phones before. When Toast is active, click is turned off in the whole view.

Do you have a chance to send a more detailed screenshot or screen recording?

sekizlipenguen commented 1 year ago

If you have set the status bar property "translucent" to true for android, you may be experiencing this problem.

sekizlipenguen commented 1 year ago

This issue doesn't appear in simulator, it happens in a physical device. Adding Root to Main function or any screens causes this.

Screenshot_2023-04-22-22-32-50-61_6b219cc4e2ae9f2fb8a14e4a0ee8b388~2.jpg

import { AppRegistry } from 'react-native';

import { name as appName } from './app.json';
import { App } from './src/app';
import { Root as PopupRootProvider } from 'react-native-popup-confirm-toast';

export default function Main() {
  return (
    <PopupRootProvider>
      <App />
    </PopupRootProvider>
  );
}

AppRegistry.registerComponent(appName, () => Main);

This function uses toast component, similarly Popup in other screens.

 const deleteMyAcc = (input: FormType) => {
    deleteAccount(
      {
        ...input,
      },
      {
        onSuccess: (s) => {
          Toast.show({
            type: 'success',
            title: 'Account Delete',
            textBody: 'Account deleted successfully',
            buttonText: 'OK',
            callback: () => Toast.hide(),
          });
          signOut();
          navigation.replace('Auth');
          console.log(s);
        },
        onError: (e) => {
          console.log(e.response?.data);
          showError(e);
        },
      }
    );
  };

I hope this version will fix the problem.

https://www.npmjs.com/package/react-native-popup-confirm-toast version: 2.3.2