remove: unused imports and leftovers
This commit is contained in:
parent
06c9c7979d
commit
edbb15daff
|
@ -1,25 +1,16 @@
|
||||||
import { Q } from '@nozbe/watermelondb';
|
import { Q } from '@nozbe/watermelondb';
|
||||||
import { sanitizedRaw } from '@nozbe/watermelondb/RawRecord';
|
import { sanitizedRaw } from '@nozbe/watermelondb/RawRecord';
|
||||||
import AsyncStorage from '@react-native-community/async-storage';
|
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 { InteractionManager } from 'react-native';
|
||||||
import RNFetchBlob from 'rn-fetch-blob';
|
|
||||||
import { setActiveUsers } from '../../actions/activeUsers';
|
import { setActiveUsers } from '../../actions/activeUsers';
|
||||||
import { connectRequest, connectSuccess, disconnect as disconnectAction } from '../../actions/connect';
|
|
||||||
import { encryptionInit } from '../../actions/encryption';
|
import { encryptionInit } from '../../actions/encryption';
|
||||||
import { loginRequest, setUser } from '../../actions/login';
|
import { setUser } from '../../actions/login';
|
||||||
import { updatePermission } from '../../actions/permissions';
|
|
||||||
import { selectServerFailure } from '../../actions/server';
|
|
||||||
import { updateSettings } from '../../actions/settings';
|
|
||||||
import { shareSelectServer, shareSetSettings, shareSetUser } from '../../actions/share';
|
import { shareSelectServer, shareSetSettings, shareSetUser } from '../../actions/share';
|
||||||
import defaultSettings from '../../constants/settings';
|
import defaultSettings from '../../constants/settings';
|
||||||
import I18n from '../../i18n';
|
|
||||||
import { getDeviceToken } from '../../notifications/push';
|
import { getDeviceToken } from '../../notifications/push';
|
||||||
import { getBundleId, isIOS } from '../../utils/deviceInfo';
|
import { getBundleId, isIOS } from '../../utils/deviceInfo';
|
||||||
import EventEmitter from '../../utils/events';
|
|
||||||
import log from '../../utils/log';
|
import log from '../../utils/log';
|
||||||
import SSLPinning from '../../utils/sslPinning';
|
import SSLPinning from '../../utils/sslPinning';
|
||||||
import { useSsl } from '../../utils/url';
|
|
||||||
import database from '../database';
|
import database from '../database';
|
||||||
import { sanitizeLikeString } from '../database/utils';
|
import { sanitizeLikeString } from '../database/utils';
|
||||||
import { Encryption } from '../encryption';
|
import { Encryption } from '../encryption';
|
||||||
|
@ -34,11 +25,10 @@ import {
|
||||||
} from '../methods/enterpriseModules';
|
} from '../methods/enterpriseModules';
|
||||||
import { getCustomEmojis, setCustomEmojis } from '../methods/getCustomEmojis';
|
import { getCustomEmojis, setCustomEmojis } from '../methods/getCustomEmojis';
|
||||||
import { getPermissions, setPermissions } from '../methods/getPermissions';
|
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 getRooms from '../methods/getRooms';
|
||||||
import getSettings, { getLoginSettings, setSettings, subscribeSettings } from '../methods/getSettings';
|
import getSettings, { getLoginSettings, setSettings, subscribeSettings } from '../methods/getSettings';
|
||||||
import getSlashCommands from '../methods/getSlashCommands';
|
import getSlashCommands from '../methods/getSlashCommands';
|
||||||
import protectedFunction from '../methods/helpers/protectedFunction';
|
|
||||||
import loadMessagesForRoom from '../methods/loadMessagesForRoom';
|
import loadMessagesForRoom from '../methods/loadMessagesForRoom';
|
||||||
import loadMissedMessages from '../methods/loadMissedMessages';
|
import loadMissedMessages from '../methods/loadMissedMessages';
|
||||||
import loadNextMessages from '../methods/loadNextMessages';
|
import loadNextMessages from '../methods/loadNextMessages';
|
||||||
|
|
|
@ -6,14 +6,10 @@ import { twoFactor } from '../../../utils/twoFactor';
|
||||||
import { useSsl } from '../../../utils/url';
|
import { useSsl } from '../../../utils/url';
|
||||||
import reduxStore from '../../createStore';
|
import reduxStore from '../../createStore';
|
||||||
import { Serialized, MatchPathPattern, OperationParams, PathFor, ResultFor } from '../../../definitions/rest/helpers';
|
import { Serialized, MatchPathPattern, OperationParams, PathFor, ResultFor } from '../../../definitions/rest/helpers';
|
||||||
import { ILoginResultFromServer } from '../../../definitions';
|
|
||||||
|
|
||||||
class Sdk {
|
class Sdk {
|
||||||
private sdk: typeof Rocketchat;
|
private sdk: typeof Rocketchat;
|
||||||
private code: any;
|
private code: any;
|
||||||
currentLogin: {
|
|
||||||
result: ILoginResultFromServer;
|
|
||||||
} | null = null;
|
|
||||||
|
|
||||||
// TODO: We need to stop returning the SDK after all methods are dehydrated
|
// TODO: We need to stop returning the SDK after all methods are dehydrated
|
||||||
initialize(server: string) {
|
initialize(server: string) {
|
||||||
|
|
|
@ -102,7 +102,6 @@ class AuthenticationWebView extends React.PureComponent<IAuthenticationWebView,
|
||||||
this.setState({ logging: true });
|
this.setState({ logging: true });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// @ts-ignore
|
|
||||||
RocketChat.loginOAuthOrSso(params);
|
RocketChat.loginOAuthOrSso(params);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(e);
|
console.warn(e);
|
||||||
|
|
Loading…
Reference in New Issue