From edbb15daff4d427ce40d5355c41ad38a5b87ee80 Mon Sep 17 00:00:00 2001 From: Gerzon Z Date: Fri, 4 Mar 2022 11:49:09 -0400 Subject: [PATCH] remove: unused imports and leftovers --- app/lib/rocketchat/rocketchat.js | 14 ++------------ app/lib/rocketchat/services/sdk.ts | 4 ---- app/views/AuthenticationWebView.tsx | 1 - 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/app/lib/rocketchat/rocketchat.js b/app/lib/rocketchat/rocketchat.js index 10a2399cb..26b832182 100644 --- a/app/lib/rocketchat/rocketchat.js +++ b/app/lib/rocketchat/rocketchat.js @@ -1,25 +1,16 @@ import { Q } from '@nozbe/watermelondb'; import { sanitizedRaw } from '@nozbe/watermelondb/RawRecord'; import AsyncStorage from '@react-native-community/async-storage'; -import { Rocketchat as RocketchatClient, settings as RocketChatSettings } from '@rocket.chat/sdk'; import { InteractionManager } from 'react-native'; -import RNFetchBlob from 'rn-fetch-blob'; import { setActiveUsers } from '../../actions/activeUsers'; -import { connectRequest, connectSuccess, disconnect as disconnectAction } from '../../actions/connect'; import { encryptionInit } from '../../actions/encryption'; -import { loginRequest, setUser } from '../../actions/login'; -import { updatePermission } from '../../actions/permissions'; -import { selectServerFailure } from '../../actions/server'; -import { updateSettings } from '../../actions/settings'; +import { setUser } from '../../actions/login'; import { shareSelectServer, shareSetSettings, shareSetUser } from '../../actions/share'; import defaultSettings from '../../constants/settings'; -import I18n from '../../i18n'; import { getDeviceToken } from '../../notifications/push'; import { getBundleId, isIOS } from '../../utils/deviceInfo'; -import EventEmitter from '../../utils/events'; import log from '../../utils/log'; import SSLPinning from '../../utils/sslPinning'; -import { useSsl } from '../../utils/url'; import database from '../database'; import { sanitizeLikeString } from '../database/utils'; import { Encryption } from '../encryption'; @@ -34,11 +25,10 @@ import { } from '../methods/enterpriseModules'; import { getCustomEmojis, setCustomEmojis } from '../methods/getCustomEmojis'; import { getPermissions, setPermissions } from '../methods/getPermissions'; -import { getRoles, onRolesChanged, setRoles } from '../methods/getRoles'; +import { getRoles, setRoles } from '../methods/getRoles'; import getRooms from '../methods/getRooms'; import getSettings, { getLoginSettings, setSettings, subscribeSettings } from '../methods/getSettings'; import getSlashCommands from '../methods/getSlashCommands'; -import protectedFunction from '../methods/helpers/protectedFunction'; import loadMessagesForRoom from '../methods/loadMessagesForRoom'; import loadMissedMessages from '../methods/loadMissedMessages'; import loadNextMessages from '../methods/loadNextMessages'; diff --git a/app/lib/rocketchat/services/sdk.ts b/app/lib/rocketchat/services/sdk.ts index 079a79ecc..41c124b11 100644 --- a/app/lib/rocketchat/services/sdk.ts +++ b/app/lib/rocketchat/services/sdk.ts @@ -6,14 +6,10 @@ import { twoFactor } from '../../../utils/twoFactor'; import { useSsl } from '../../../utils/url'; import reduxStore from '../../createStore'; import { Serialized, MatchPathPattern, OperationParams, PathFor, ResultFor } from '../../../definitions/rest/helpers'; -import { ILoginResultFromServer } from '../../../definitions'; class Sdk { private sdk: typeof Rocketchat; private code: any; - currentLogin: { - result: ILoginResultFromServer; - } | null = null; // TODO: We need to stop returning the SDK after all methods are dehydrated initialize(server: string) { diff --git a/app/views/AuthenticationWebView.tsx b/app/views/AuthenticationWebView.tsx index d9eb5a111..ac304fbfb 100644 --- a/app/views/AuthenticationWebView.tsx +++ b/app/views/AuthenticationWebView.tsx @@ -102,7 +102,6 @@ class AuthenticationWebView extends React.PureComponent