Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delay before message bar appears #8

Closed
Talor-A opened this issue Aug 3, 2017 · 6 comments
Closed

delay before message bar appears #8

Talor-A opened this issue Aug 3, 2017 · 6 comments

Comments

@Talor-A
Copy link
Owner

Talor-A commented Aug 3, 2017

Original Issue here.

@gyfis
Copy link

gyfis commented Sep 5, 2017

It would seem that the delay is caused by the alert hiding system which does not properly recognize if there is an alert shown or not. Plus there's an additional 100ms delay.

@rochapablo
Copy link

rochapablo commented Oct 30, 2017

The delay still on 2.0.6

@raghudevan
Copy link

I'm seeing a lot of delay on android; 20+ seconds for the alert to show up (This is on Android)

@Talor-A
Copy link
Owner Author

Talor-A commented Dec 1, 2017

I'm not able to reproduce this @rochapablo @raghudevan , please post sample code or send a PR.

@malonguwa
Copy link

malonguwa commented Dec 11, 2017

UPDATED: I just deleted all my existed emulator and add it into the Android Studio again, now everything is working well... I guess something wrong with my emulator. If anybody is using the the Android Studio Emulator (AVD Manager) you can try delete and add again. It solves my issues, and Android Studio Emulator is not really stable, I also experience some Tab bar switch delay issue as well, and after I re-add it, the issue is gone.

@Talor-A Thanks for maintain this lovely message bar, I try to use it in my project, but it is seems not work (a lot of delay) for my Android Emulator Pixel_API_26:5554 which comes with the Android Studio. But it is perfectly working in iOS Simulator. I do not have any Android phone at the moment, so I can not test it on real phone.

my implementation code is really simple (Not using redux in my project).

let MessageBarAlert = require('react-native-message-bar').MessageBar;
let MessageBarManager = require('react-native-message-bar').MessageBarManager;

    componentDidMount() {
        MessageBarManager.registerMessageBar(this.refs.alert);
    }

    componentWillUnmount() {
        MessageBarManager.unregisterMessageBar();
    }

    _navigateToMainTabScreen = () => {
        this.dismissSystemKeyboard();
        if (this.fieldsValidator() === true) {
           // switch to mainTab screen
        } else {
            MessageBarManager.showAlert({
                title: 'Missing field',
                message: 'Please fill in both fields in order to login',
                alertType: 'error',
                viewTopInset: 8,
            })
        }
    };
    render() {
        return (
            <View>
             ..........
                           <MessageBarAlert ref="alert" />
            </View>
     }

@Talor-A
Copy link
Owner Author

Talor-A commented Dec 12, 2017

hm, strange that it wasn't working on the android emulator. there's no native code, so everything should be the same. glad to see it's alright now. going to close this, I'll reopen if someone else has the same issue.

@Talor-A Talor-A closed this as completed Dec 12, 2017
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

No branches or pull requests

5 participants