diff --git a/app/components/NavigationBar.js b/app/components/NavigationBar.js
index 9461537..3b0c29e 100644
--- a/app/components/NavigationBar.js
+++ b/app/components/NavigationBar.js
@@ -1,135 +1,135 @@
import React, { Component } from 'react';
import { Linking, Image, View } from 'react-native';
import PropTypes from 'prop-types';
import autoBind from 'auto-bind';
import { Appbar, Menu, Divider, Text } from 'react-native-paper';
import { Icon } from 'material-bread';
import config from '../config';
import AboutModal from './AboutModal';
import CallMeMaybeModal from './CallMeMaybeModal';
import styles from '../assets/styles/blink/_NavigationBar.scss';
const blinkLogo = require('../assets/images/blink-white-big.png');
class NavigationBar extends Component {
constructor(props) {
super(props);
autoBind(this);
this.state = {
showAboutModal: false,
showCallMeMaybeModal: false,
mute: false,
menuVisible: false
}
- if (props.account) {
- this.callUrl = `${config.publicUrl}/call/${props.account.id}`;
- } else {
- this.callUrl = '';
- }
-
this.menuRef = React.createRef();
}
handleMenu(event) {
+ this.callUrl = `${config.publicUrl}/call/${this.props.account.id}`;
switch (event) {
case 'about':
this.toggleAboutModal();
break;
case 'callMeMaybe':
this.toggleCallMeMaybeModal();
break;
case 'logOut':
this.props.logout();
break;
case 'preview':
this.props.preview();
break;
case 'settings':
Linking.openURL(config.serverSettingsUrl);
break;
default:
break;
}
this.setState({menuVisible: false});
}
toggleMute() {
this.setState(prevState => ({mute: !prevState.mute}));
this.props.toggleMute();
}
toggleAboutModal() {
this.setState({showAboutModal: !this.state.showAboutModal});
}
toggleCallMeMaybeModal() {
this.setState({showCallMeMaybeModal: !this.state.showCallMeMaybeModal});
}
render() {
const muteIcon = this.state.mute ? 'bell-off' : 'bell';
let statusIcon = null;
+ let account_id = '';
statusIcon = 'check-circle';
if (!this.props.connection || this.props.connection.state !== 'ready') {
statusIcon = 'error-outline';
} else if (this.props.registrationState && this.props.registrationState !== 'registered') {
statusIcon = 'priority-high';
}
//
+ if (this.props.account) {
+ account_id = this.props.account.id;
+ }
+
return (
{statusIcon ?
: null }
);
}
}
NavigationBar.propTypes = {
notificationCenter : PropTypes.func.isRequired,
account : PropTypes.object.isRequired,
logout : PropTypes.func.isRequired,
preview : PropTypes.func.isRequired,
toggleMute : PropTypes.func.isRequired
};
export default NavigationBar;