Authored by 于良

取消用户数据随crash上传 review by yewanwan

... ... @@ -64,18 +64,14 @@ function mapDispatchToProps(dispatch) {
class App extends Component {
componentDidMount() {
errorHandler.init();
this.props.actions.getStoredUserInfo();
this.props.actions.getGuideDisplayState();
}
componentWillUnmount() {
let userInfo = {
account: this.props.user.profile.account,
pid: this.props.user.profile.pid,
sessionKey: this.props.user.profile.sessionKey,
};
errorHandler.init(userInfo);
}
render() {
... ...
... ... @@ -3,19 +3,19 @@
import StackTrace from 'stacktrace-js';
import { Crashlytics } from 'react-native-fabric';
function init(userInfo) {
function init() {
if (__DEV__) {
// Don't send exceptions from __DEV__, it's way too noisy!
// Live reloading and hot reloading in particular lead to tons of noise...
return;
}
if (userInfo) {
let {account, pid, sessionKey} = userInfo;
Crashlytics.setUserName(account || 'unknow');
Crashlytics.setString(pid || 'unknow');
Crashlytics.setString(sessionKey || 'unknow');
}
// if (userInfo) {
// let {account, pid, sessionKey} = userInfo;
// Crashlytics.setUserName(account || 'unknow');
// Crashlytics.setString(pid || 'unknow');
// Crashlytics.setString(sessionKey || 'unknow');
// }
let originalHandler = global.ErrorUtils.getGlobalHandler();
function errorHandler(e) {
... ...