Merge pull request #763 from jitsi/hide_toolbar_when_ringing

Hide the toolbar when the the ring overlay is displayed
This commit is contained in:
Дамян Минков 2016-08-03 13:00:52 -05:00 committed by GitHub
commit 9a25db34aa
2 changed files with 12 additions and 3 deletions

View File

@ -298,7 +298,9 @@ UI.initConference = function () {
UI.updateLocalRole(false); UI.updateLocalRole(false);
// Once we've joined the muc show the toolbar // Once we've joined the muc show the toolbar
ToolbarToggler.showToolbar(); if (!RingOverlay.isDisplayed()) {
ToolbarToggler.showToolbar();
}
let displayName = config.displayJids ? id : Settings.getDisplayName(); let displayName = config.displayJids ? id : Settings.getDisplayName();
@ -1413,14 +1415,12 @@ let bottomToolbarEnabled = null;
UI.showRingOverLay = function () { UI.showRingOverLay = function () {
RingOverlay.show(APP.tokenData.callee); RingOverlay.show(APP.tokenData.callee);
ToolbarToggler.setAlwaysVisibleToolbar(true);
FilmStrip.toggleFilmStrip(false); FilmStrip.toggleFilmStrip(false);
}; };
UI.hideRingOverLay = function () { UI.hideRingOverLay = function () {
if (!RingOverlay.hide()) if (!RingOverlay.hide())
return; return;
ToolbarToggler.resetAlwaysVisibleToolbar();
FilmStrip.toggleFilmStrip(true); FilmStrip.toggleFilmStrip(true);
}; };

View File

@ -78,5 +78,14 @@ export default {
overlay.destroy(); overlay.destroy();
overlay = null; overlay = null;
return true; return true;
},
/**
* Checks whether or not the ring overlay is currently displayed.
*
* @returns {boolean} true if the ring overlay is currently displayed or
* false otherwise.
*/
isDisplayed () {
return overlay !== null;
} }
}; };