diff --git a/app/components/ConferenceDrawerLog.js b/app/components/ConferenceDrawerLog.js
index e98e1e6..349dd16 100644
--- a/app/components/ConferenceDrawerLog.js
+++ b/app/components/ConferenceDrawerLog.js
@@ -1,49 +1,50 @@
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import utils from '../utils';
import { Title, Text, List } from 'react-native-paper';
import { View, FlatList } from 'react-native';
import styles from '../assets/styles/blink/_ConferenceDrawerLog.scss';
const ConferenceDrawerLog = props => {
const renderItem = ( {item, index} ) => {
const elem = item
const originator = elem.originator.displayName || elem.originator.uri || elem.originator;
const messages = elem.messages.map((message, index) => {
return {message};
});
const number = props.log.length - index;
const color = utils.generateMaterialColor(elem.originator.uri || elem.originator)['300'];
const title = (<>{originator} {elem.action} {messages}>);
return (
{number}}
/>
)
}
return (
Configuration Events
index}
>
);
};
ConferenceDrawerLog.propTypes = {
log: PropTypes.array.isRequired
};
export default ConferenceDrawerLog;
diff --git a/app/components/ConferenceDrawerSpeakerSelection.js b/app/components/ConferenceDrawerSpeakerSelection.js
index d9cd166..2f72838 100644
--- a/app/components/ConferenceDrawerSpeakerSelection.js
+++ b/app/components/ConferenceDrawerSpeakerSelection.js
@@ -1,111 +1,112 @@
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import autoBind from 'auto-bind';
import { FlatList, TouchableOpacity, View, Text } from 'react-native';
import { Button } from 'react-native-paper';
import { SwipeRow } from 'react-native-swipe-list-view';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import ConferenceDrawerParticipant from './ConferenceDrawerParticipant';
import styles from '../assets/styles/blink/_ConferenceDrawerSpeakerSelection.scss';
class ConferenceDrawerSpeakerSelection extends Component {
constructor(props) {
super(props);
autoBind(this)
this.state = {
speakers: props.activeSpeakers.map((participant) => {return participant.id}),
};
}
handleFirstSpeakerSelected(event) {
if (event === 'none') {
if (this.state.speakers.length > 0) {
this.props.selected({id: event});
const newSpeakers = this.state.speakers.slice(1);
this.setState({speakers: newSpeakers});
}
} else {
if (this.state.speakers[0] !== this.props.participants[event.id].id) {
this.props.selected(this.props.participants[event.id]);
const newSpeakers = this.state.speakers.slice();
newSpeakers[0] = this.props.participants[event.id].id;
this.setState({speakers: newSpeakers});
}
}
}
handleSecondSpeakerSelected(event) {
if (event === 'none') {
if (this.state.speakers.length > 1) {
this.props.selected({id: event}, true);
const newSpeakers = this.state.speakers.slice();
newSpeakers.pop();
this.setState({speakers: newSpeakers});
}
} else {
const newSpeakers = this.state.speakers.slice();
newSpeakers[1] = this.props.participants[event.id].id;
this.setState({speakers: newSpeakers});
this.props.selected(this.props.participants[event.id], true);
}
}
render() {
const parts = [];
let changeFunction = this.handleFirstSpeakerSelected;
if (this.props.selectSpeaker === 2) {
changeFunction = this.handleSecondSpeakerSelected;
}
this.props.participants.forEach((p, index) => {
const id = index;
if (this.state.speakers[this.props.selectSpeaker-1] === p.id) {
parts.push(
changeFunction('none')} style={styles.button}>
Remove
);
} else {
parts.push(
changeFunction({id: id})} key={p.id}>
);
}
});
return (
{/* {this.props.activeSpeakers.length === this.props.selectSpeaker && } */}
{return (item)}}
/>
);
}
}
ConferenceDrawerSpeakerSelection.propTypes = {
participants: PropTypes.array.isRequired,
selected: PropTypes.func,
activeSpeakers: PropTypes.array
};
export default ConferenceDrawerSpeakerSelection;