Skip to content

Commit

Permalink
When closing account/admin go to home(Chat List) page directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Shailesh351 committed May 21, 2020
1 parent f361cc5 commit d5aa670
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/ui-utils/client/lib/SideNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { FlowRouter } from 'meteor/kadira:flow-router';
import { Session } from 'meteor/session';

import { AccountBox } from './AccountBox';
import { roomTypes } from '../../../utils/client/lib/roomTypes';
import { roomTypes, isMobile } from '../../../utils';
import { Subscriptions } from '../../../models';

export const SideNav = new class {
Expand Down Expand Up @@ -46,7 +46,7 @@ export const SideNav = new class {
const routesNamesForRooms = roomTypes.getTypes().filter((i) => i.route).map((i) => i.route.name);
if (!routesNamesForRooms.includes(FlowRouter.current().route.name)) {
const subscription = Subscriptions.findOne({ rid: Session.get('openedRoom') });
if (subscription) {
if (subscription && !isMobile()) {
roomTypes.openRouteLink(subscription.t, subscription, FlowRouter.current().queryParams);
} else {
FlowRouter.go('home');
Expand Down

0 comments on commit d5aa670

Please sign in to comment.