Skip to content

Commit

Permalink
Merge pull request RocketChat#291 from Shailesh351/sb_fix_demo
Browse files Browse the repository at this point in the history
[Upstream Demo] Some Fixes
  • Loading branch information
ear-dev authored May 22, 2020
2 parents f361cc5 + 270ba9c commit d78d685
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/ui-sidenav/client/SortList.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Icon, ToggleSwitch, RadioButton, Box, Flex, Margins } from '@rocket.cha
import { useTranslation } from '../../../client/contexts/TranslationContext';
import { useUserPreference } from '../../../client/contexts/UserContext';
import { useMethod } from '../../../client/contexts/ServerContext';
import { isMobile } from '../../utils';

function SortListItem({ text, icon, input }) {
return <Flex.Container>
Expand Down Expand Up @@ -34,7 +35,7 @@ export function SortList() {
return <>
<div className='rc-popover__column'>
<SortModeList/>
<ViewModeList/>
{isMobile() ? null : <ViewModeList/>}
<GroupingList/>
</div>
</>;
Expand Down
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 d78d685

Please sign in to comment.