Skip to content

Commit

Permalink
Merge pull request RocketChat#165 from WideChat/ear_sidebar_item_fix
Browse files Browse the repository at this point in the history
fix hide room and other sidebar items
  • Loading branch information
ear-dev authored Feb 22, 2020
2 parents 5cecaa2 + 0a02b09 commit 1751caa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/ui-share/client/share.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Template } from 'meteor/templating';

import { getShareData, isMobile } from '../../utils';
import { getShareData } from '../../utils';

function getShareString() {
const data = getShareData();
Expand Down
8 changes: 4 additions & 4 deletions app/ui-sidenav/client/sidebarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function setLastMessageTs(instance, ts) {
}, 60000);
}

function getConfig(e) {
const getConfig = function(e) {
const canLeave = () => {
const roomData = Session.get(`roomData${ this.rid }`);

Expand Down Expand Up @@ -158,7 +158,7 @@ function getConfig(e) {
currentTarget: e.currentTarget,
offsetHorizontal: -e.currentTarget.clientWidth,
};
}
};

Template.sidebarItem.onCreated(function() {
this.user = Users.findOne(Meteor.userId(), { fields: { username: 1 } });
Expand Down Expand Up @@ -205,7 +205,7 @@ Template.sidebarItem.events({
return;
}

const config = getConfig(e);
const config = getConfig.call(this, e);

const doLongTouch = () => {
popover.open(config);
Expand All @@ -221,7 +221,7 @@ Template.sidebarItem.events({
e.stopPropagation(); // to not close the menu
e.preventDefault();

const config = getConfig(e);
const config = getConfig.call(this, e);
popover.open(config);
},
});
Expand Down

0 comments on commit 1751caa

Please sign in to comment.