Skip to content

Commit

Permalink
Fix room blinking opening a thread
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Jun 22, 2020
1 parent 7c7999d commit c540cbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/ui-utils/client/lib/openRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ export const openRoom = async function(type, name) {
return FlowRouter.go('direct', { rid: room._id }, FlowRouter.current().queryParams);
}


if (room._id === Session.get('openedRoom')) {
return;
}

const [mainNode, roomDom] = await replaceCenterDomBy(() => RoomManager.getDomOfRoom(type + name, room._id, roomTypes.getConfig(type).mainTemplate));

if (mainNode) {
Expand Down
5 changes: 4 additions & 1 deletion app/utils/lib/roomExit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { BlazeLayout } from 'meteor/kadira:blaze-layout';

import { callbacks } from '../../callbacks';

export const roomExit = function() {
export const roomExit = function({ oldRoute, ...context }) {
if (oldRoute && oldRoute._params.keys.name.replace(/"/g, '') === context.params.name) {
return;
}
// 7370 - Close flex-tab when opening a room on mobile UI
if (window.matchMedia('(max-width: 500px)').matches) {
const flex = document.querySelector('.flex-tab');
Expand Down

0 comments on commit c540cbb

Please sign in to comment.