From 7dc76b3c2d070cc98155f6750053c18a4dce052e Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Fri, 14 Jul 2023 09:26:10 -0300 Subject: [PATCH] Cleanup --- .../chat/rocket/reactnative/MainApplication.java | 2 +- android/settings.gradle | 8 -------- app/lib/services/connect.ts | 2 -- app/stacks/InsideStack.tsx | 2 -- app/views/RoomView/List/index.tsx | 16 ---------------- 5 files changed, 1 insertion(+), 29 deletions(-) diff --git a/android/app/src/main/java/chat/rocket/reactnative/MainApplication.java b/android/app/src/main/java/chat/rocket/reactnative/MainApplication.java index 9ae14b69a..cc8ceebb9 100644 --- a/android/app/src/main/java/chat/rocket/reactnative/MainApplication.java +++ b/android/app/src/main/java/chat/rocket/reactnative/MainApplication.java @@ -36,8 +36,8 @@ public class MainApplication extends Application implements ReactApplication { protected List getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List packages = new PackageList(this).getPackages(); - packages.add(new SSLPinningPackage()); packages.add(new RNCViewPagerPackage()); + packages.add(new SSLPinningPackage()); List additionalModules = new AdditionalModules().getAdditionalModules(MainApplication.this); packages.addAll(additionalModules); return packages; diff --git a/android/settings.gradle b/android/settings.gradle index ae0e49e8e..80b64add4 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -11,14 +11,6 @@ apply from: file("../node_modules/@react-native-community/cli-platform-android/n include ':app' includeBuild('../node_modules/@react-native/gradle-plugin') -// includeBuild('../node_modules/react-native') { -// dependencySubstitution { -// substitute(module("com.facebook.react:react-android")).using(project(":ReactAndroid")) -// substitute(module("com.facebook.react:react-native")).using(project(":ReactAndroid")) -// substitute(module("com.facebook.react:hermes-android")).using(project(":ReactAndroid:hermes-engine")) -// substitute(module("com.facebook.react:hermes-engine")).using(project(":ReactAndroid:hermes-engine")) -// } -// } includeBuild('../node_modules/react-native') { dependencySubstitution { substitute(module("com.facebook.react:react-android")).using(project(":packages:react-native:ReactAndroid")) diff --git a/app/lib/services/connect.ts b/app/lib/services/connect.ts index bd7b7523a..d64069f49 100644 --- a/app/lib/services/connect.ts +++ b/app/lib/services/connect.ts @@ -402,9 +402,7 @@ function disconnect() { async function getServerInfo(server: string) { try { const response = await RNFetchBlob.fetch('GET', `${server}/api/info`, { ...RocketChatSettings.customHeaders }); - // const response = await fetch(`${server}/api/info`, { ...RocketChatSettings.customHeaders }) try { - console.log('🚀 ~ file: connect.ts:406 ~ getServerInfo ~ response:', response); // Try to resolve as json const jsonRes: { version?: string; success: boolean } = response.json(); if (!jsonRes?.success) { diff --git a/app/stacks/InsideStack.tsx b/app/stacks/InsideStack.tsx index b1bb6bcde..338c6c1c7 100644 --- a/app/stacks/InsideStack.tsx +++ b/app/stacks/InsideStack.tsx @@ -233,8 +233,6 @@ const DrawerNavigator = () => { } - // Performance issues on Android when disabled - // useLegacyImplementation screenOptions={{ swipeEnabled: false, headerShown: false, diff --git a/app/views/RoomView/List/index.tsx b/app/views/RoomView/List/index.tsx index c9b585a9d..c98659390 100644 --- a/app/views/RoomView/List/index.tsx +++ b/app/views/RoomView/List/index.tsx @@ -3,7 +3,6 @@ import { dequal } from 'dequal'; import moment from 'moment'; import React from 'react'; import { FlatListProps, View, ViewToken, StyleSheet, Platform } from 'react-native'; -// import { event, Value } from 'react-native-reanimated'; import { Observable, Subscription } from 'rxjs'; import ActivityIndicator from '../../../containers/ActivityIndicator'; @@ -14,7 +13,6 @@ import { animateNextTransition } from '../../../lib/methods/helpers/layoutAnimat import log from '../../../lib/methods/helpers/log'; import EmptyRoom from '../EmptyRoom'; import List, { IListProps, TListRef } from './List'; -// import NavBottomFAB from './NavBottomFAB'; import { loadMissedMessages, loadThreadMessages } from '../../../lib/methods'; import { Services } from '../../../lib/services'; import RefreshControl from './RefreshControl'; @@ -31,18 +29,6 @@ const styles = StyleSheet.create({ } }); -// const onScroll = ({ y }: { y: Value }) => -// event( -// [ -// { -// nativeEvent: { -// contentOffset: { y } -// } -// } -// ], -// { useNativeDriver: true } -// ); - export { type IListProps }; export interface IListContainerProps { @@ -71,8 +57,6 @@ class ListContainer extends React.Component void; private viewabilityConfig = { itemVisiblePercentThreshold: 10