Addresses comment about Feedback dependency
This commit is contained in:
parent
777217bd75
commit
570124058c
|
@ -16,7 +16,7 @@ import mediaDeviceHelper from './modules/devices/mediaDeviceHelper';
|
|||
|
||||
import {reportError} from './modules/util/helpers';
|
||||
|
||||
import Feedback from './modules/UI/Feedback';
|
||||
import UIErrors from './modules/UI/UIErrors';
|
||||
|
||||
const ConnectionEvents = JitsiMeetJS.events.connection;
|
||||
const ConnectionErrors = JitsiMeetJS.errors.connection;
|
||||
|
@ -240,7 +240,7 @@ function hangup (requestFeedback = false) {
|
|||
// to return a rejected promise. In the case of feedback request
|
||||
// in progress it's important to not redirect to the welcome page
|
||||
// (see below maybeRedirectToWelcomePage call).
|
||||
if (err === Feedback.FEEDBACK_REQUEST_IN_PROGRESS) {
|
||||
if (err === UIErrors.FEEDBACK_REQUEST_IN_PROGRESS) {
|
||||
return Promise.reject('Feedback request in progress.');
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -86,11 +86,6 @@ function _showFeedbackButton (show) {
|
|||
* toggleStars: Function, hoverStars: Function, unhoverStars: Function}}
|
||||
*/
|
||||
var Feedback = {
|
||||
/**
|
||||
* Indicates a state of the Feedback dialog.
|
||||
*/
|
||||
FEEDBACK_REQUEST_IN_PROGRESS: "FeedbackRequestInProgress",
|
||||
|
||||
/**
|
||||
* The feedback score. -1 indicates no score has been given for now.
|
||||
*/
|
||||
|
|
|
@ -23,6 +23,7 @@ import SettingsMenu from "./side_pannels/settings/SettingsMenu";
|
|||
import Settings from "./../settings/Settings";
|
||||
import { reload } from '../util/helpers';
|
||||
import RingOverlay from "./ring_overlay/RingOverlay";
|
||||
import UIErrors from './UIErrors';
|
||||
|
||||
var EventEmitter = require("events");
|
||||
UI.messageHandler = require("./util/MessageHandler");
|
||||
|
@ -1064,7 +1065,7 @@ UI.inviteParticipants = function (roomUrl, conferenceName, key, nick) {
|
|||
*/
|
||||
UI.requestFeedback = function () {
|
||||
if (Feedback.isVisible())
|
||||
return Promise.reject(Feedback.FEEDBACK_REQUEST_IN_PROGRESS);
|
||||
return Promise.reject(UIErrors.FEEDBACK_REQUEST_IN_PROGRESS);
|
||||
else
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (Feedback.isEnabled()) {
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* A list of all UI errors.
|
||||
*/
|
||||
module.exports = {
|
||||
/**
|
||||
* Indicates that a Feedback request is currently in progress.
|
||||
* @type {{FEEDBACK_REQUEST_IN_PROGRESS: string}}
|
||||
*/
|
||||
FEEDBACK_REQUEST_IN_PROGRESS: "FeedbackRequestInProgress"
|
||||
};
|
Loading…
Reference in New Issue