updates to handle the updated notification implementation in lbry-redux

This commit is contained in:
Akinwale Ariwodola 2018-11-24 14:19:44 +01:00
parent eb4995da86
commit f1ee7586f9
2 changed files with 12 additions and 15 deletions

11
app/package-lock.json generated
View file

@ -3993,8 +3993,17 @@
"version": "github:lbryio/lbryinc#f2fff2a331578aef84eb77c108f976967afc50e0",
"from": "github:lbryio/lbryinc",
"requires": {
"lbry-redux": "github:lbryio/lbry-redux#31f7afa8a37f5741dac01fc1ecdf153f3bed95dc",
"reselect": "^3.0.0"
},
"dependencies": {
"lbry-redux": {
"version": "github:lbryio/lbry-redux#31f7afa8a37f5741dac01fc1ecdf153f3bed95dc",
"from": "github:lbryio/lbry-redux#31f7afa8a37f5741dac01fc1ecdf153f3bed95dc",
"requires": {
"proxy-polyfill": "0.1.6",
"reselect": "^3.0.0"
}
}
}
},
"lcid": {

View file

@ -33,7 +33,7 @@ import {
ToastAndroid
} from 'react-native';
import { doDeleteCompleteBlobs } from '../redux/actions/file';
import { SETTINGS, doHideNotification, doToast, selectToast } from 'lbry-redux';
import { SETTINGS, doDismissToast, doToast, selectToast } from 'lbry-redux';
import {
doUserEmailVerify,
doUserEmailVerifyFailure,
@ -250,18 +250,6 @@ class AppWithNavigationState extends React.Component {
if (toast) {
const { message } = toast;
let currentDisplayType;
if (displayType && displayType.length) {
for (let i = 0; i < displayType.length; i++) {
const type = displayType[i];
if (AppWithNavigationState.supportedDisplayTypes.indexOf(type) > -1) {
currentDisplayType = type;
break;
}
}
} else if (AppWithNavigationState.supportedDisplayTypes.indexOf(displayType) > -1) {
currentDisplayType = displayType;
}
if (!currentDisplayType && message) {
// default to toast if no display type set and there is a message specified
currentDisplayType = 'toast';
@ -271,7 +259,7 @@ class AppWithNavigationState extends React.Component {
ToastAndroid.show(message, ToastAndroid.LONG);
}
dispatch(doHideNotification());
dispatch(doDismissToast());
}
if (user &&