Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ToastView =
}
try {
// setTimeout fires incorrectly when using chrome debug #4470
// https://github.com/facebook/react-native/issues/4470
global.wxToastRootSiblings && global.wxToastRootSiblings.destroy()
global.wxToastRootSiblings = new RootSiblings(ToastView)
setTimeout(() => {
global.wxToastRootSiblings && global.wxToastRootSiblings.update(ToastView)
success && success()
}, 100)
if (duration > 0) {
setTimeout(() => {
console.log('destroy')
global.wxToastRootSiblings && global.wxToastRootSiblings.destroy()
}, duration)
}
return successHandler(success, complete)(res)
} catch (e) {
res.errMsg = `showToast:fail invalid ${e}`
return errorHandler(fail, complete)(res)
}
}
createModal() {
// Protect against setState happening asynchronously
if (!this.sibling) {
this.sibling = new Sibling(this.renderModal());
}
}
static showSiblings = (params) => {
SiblingsNotice.siblingInstance = new RootSiblings()
};
setCurrent(props: Object, callback?: Function = () => {}): void {
if (!props) {
return;
}
this.currentActionSheet = new RootSiblings(
,
callback,
);
}
componentWillMount() {
this._alert = new RootSiblings();
}
showActionSheetWithOptions: (config, callback) => {
if (Platform.OS === 'ios' && ActionSheet.useActionSheetIOS) {
ActionSheetIOS.showActionSheetWithOptions(config, callback);
return;
}
if (instance) {
return;
}
instance = new RootSiblings(
{
instance && instance.destroy(() => {
instance = null;
setTimeout(() => {
callback && callback(index);
}, 0);
});
}}
/>
);
},
};
import React, { Component } from 'react';
import { Text, View, StyleSheet, TouchableOpacity } from 'react-native';
import RootSiblings from 'react-native-root-siblings';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as homeActions from '../../action/home';
let sibling = new RootSiblings(
(
start = () => {
if (!this.sibling) {
this.sibling = new RootSiblings(
(
(this.refModal = c)}
next={this.next}
prev={this.prev}
stop={this.stop}
contentRender={this.opts.contentRender}
showStepNumber={this.opts.showStepNumber}
maskStyle={this.opts.maskStyle}
touchable={this.opts.touchable}
maskClosable={this.opts.maskClosable}
/>
)
);
}
this.cleartTimers();
static show(type='Circle') {
indicator || (
indicator = new RootSiblings(
)
);
}