Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(() => {
this.props.eventBus.emit('hideLoading');
this.deleting = true;
Actions.pop();
let state = this.props.store.getState();
let actions = [];
if (state.app.activeSphere === this.props.sphereId)
actions.push({type:"CLEAR_ACTIVE_SPHERE"});
actions.push({type:'REMOVE_SPHERE', sphereId: this.props.sphereId});
// stop tracking sphere.
Bluenet.stopTrackingIBeacon(state.spheres[this.props.sphereId].config.iBeaconUUID);
this.props.store.batchDispatch(actions);
})
}
onActionSelected(position) {
if (position === 0) { // index of 'Add'
Actions.add();
} else if (position === 1) { // index of 'Done'
Actions.pop();
}
}
function* deleteBasketWatcher() {
while (true) {
// Wait until we get a delete request
const { payload: id } = yield take([BASKET_DELETE_REQUEST])
try {
// Fetch and return it
yield deleteBasket(id)
yield put({type: BASKET_DELETE_SUCCESS, payload: id})
// And leave the scene of action
Actions.pop()
} catch(e) {/* Errors are handled via Redux reducers */}
}
}
.then(({ path: avatar }) => {
const user = _.merge({}, this.props.user, { avatar });
this.props.updateUser(user);
Actions.pop();
})
.catch(err => console.error(err));
loginSucceed() {
Actions.pop();
}
setTimeout((res) => {
Actions.pop();
}, 500);
});
onPress={() => Actions.pop()}
size={22}
BackAndroid.addEventListener('hardwareBackPress', function () {
if (this.props.loader.loading === true) {
return true
}
switch (self.props.scene) {
case 'username':
self.props.dispatch(fadeWhiteOverlay())
Actions.pop()
break
default:
Actions.pop()
}
return true
})
}
setBlock(props) {
const {uid, names, rosterNames} = props
let isBlocked = names.indexOf(uid) !== -1
this.setState({
isBlocked
})
if (rosterNames.indexOf(uid) === -1) {
NavigationActions.pop()
}
}
handler: () => {
this.props.logout();
Actions.pop();
}
};