Bug 1212083 - Part 1. Remove the direct calls UI from Loop. r=mikedeboer

This commit is contained in:
Mark Banner
2015-10-09 12:14:44 +01:00
parent 9c9732c387
commit 2a49321b2b
30 changed files with 107 additions and 1142 deletions

View File

@@ -8,11 +8,11 @@ loop.conversation = (function(mozL10n) {
var sharedMixins = loop.shared.mixins;
var sharedActions = loop.shared.actions;
var FAILURE_DETAILS = loop.shared.utils.FAILURE_DETAILS;
var CallControllerView = loop.conversationViews.CallControllerView;
var DesktopRoomConversationView = loop.roomViews.DesktopRoomConversationView;
var FeedbackView = loop.feedbackViews.FeedbackView;
var DirectCallFailureView = loop.conversationViews.DirectCallFailureView;
var RoomFailureView = loop.roomViews.RoomFailureView;
/**
* Master controller view for handling if incoming or outgoing calls are
@@ -68,15 +68,6 @@ loop.conversation = (function(mozL10n) {
}
switch(this.state.windowType) {
// CallControllerView is used for both.
case "incoming":
case "outgoing": {
return (React.createElement(CallControllerView, {
chatWindowDetached: this.state.chatWindowDetached,
dispatcher: this.props.dispatcher,
mozLoop: this.props.mozLoop,
onCallTerminated: this.handleCallTerminated}));
}
case "room": {
return (React.createElement(DesktopRoomConversationView, {
chatWindowDetached: this.state.chatWindowDetached,
@@ -86,11 +77,10 @@ loop.conversation = (function(mozL10n) {
roomStore: this.props.roomStore}));
}
case "failed": {
return (React.createElement(DirectCallFailureView, {
contact: {},
return (React.createElement(RoomFailureView, {
dispatcher: this.props.dispatcher,
mozLoop: this.props.mozLoop,
outgoing: false}));
failureReason: FAILURE_DETAILS.UNKNOWN,
mozLoop: this.props.mozLoop}));
}
default: {
// If we don't have a windowType, we don't know what we are yet,
@@ -127,7 +117,6 @@ loop.conversation = (function(mozL10n) {
var useDataChannels = loop.shared.utils.getBoolPreference("textChat.enabled");
var dispatcher = new loop.Dispatcher();
var client = new loop.Client();
var sdkDriver = new loop.OTSdkDriver({
isDesktop: true,
useDataChannels: useDataChannels,
@@ -140,12 +129,6 @@ loop.conversation = (function(mozL10n) {
loop.conversation._sdkDriver = sdkDriver;
// Create the stores.
var conversationStore = new loop.store.ConversationStore(dispatcher, {
client: client,
isDesktop: true,
mozLoop: navigator.mozLoop,
sdkDriver: sdkDriver
});
var activeRoomStore = new loop.store.ActiveRoomStore(dispatcher, {
isDesktop: true,
mozLoop: navigator.mozLoop,
@@ -166,7 +149,6 @@ loop.conversation = (function(mozL10n) {
loop.store.StoreMixin.register({
conversationAppStore: conversationAppStore,
conversationStore: conversationStore,
textChatStore: textChatStore
});