Merge pull request #12211 from ramonlsouza/unused-code

refactor: remove unused code
This commit is contained in:
Anton Georgiev 2021-04-29 13:01:31 -04:00 committed by GitHub
commit 234551d9bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1 additions and 32 deletions

View File

@ -1,4 +1,3 @@
import flat from 'flat';
import { Match, check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import { GroupChatMsg } from '/imports/api/group-chat-msg';

View File

@ -1,5 +1,4 @@
import Logger from '/imports/startup/server/logger';
import { check } from 'meteor/check';
import Users from '/imports/api/users';
export default function setMobile(meetingId, userId) {

View File

@ -1,4 +1,4 @@
import React, { Component, Fragment } from 'react';
import React, { Component } from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import PropTypes from 'prop-types';
import Auth from '/imports/ui/services/auth';

View File

@ -37,8 +37,6 @@ const getHelp = () => {
return null;
};
const getLevel = () => STATS.level;
const getStats = () => {
statsDep.depend();
return STATS.level[stats];

View File

@ -138,33 +138,6 @@ const sortUsers = (a, b) => {
return sort;
};
const sortChatsByName = (a, b) => sortUsersByName(a, b);
const sortChatsByUserId = (a, b) => sortUsersByUserId(a, b);
const sortChatsByIcon = (a, b) => {
if (a.icon && !b.icon) {
return -1;
} if (!a.icon && b.icon) {
return 1;
}
return 0;
};
const sortByRecentActivity = (a, b) => {
const aActivity = a.lastActivity ? a.lastActivity : 0;
const bActivity = b.lastActivity ? b.lastActivity : 0;
if (aActivity > bActivity) {
return -1;
} if (aActivity < bActivity) {
return 1;
}
return 0;
};
const isPublicChat = chat => (
chat.userId === 'public'
);