FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

- update dependencies to latest version · AmesianX/SendBird-JavaScript@3a3c765 · GitHub

Commit 3a3c765

Browse files
committed
- update dependencies to latest version
- removed deprecated codes - fixed receive message bugs - fixed image message not showing on android
1 parent b9751eb commit 3a3c765

70 files changed

Lines changed: 8018 additions & 7883 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = {
22
root: true,
33
extends: '@react-native-community',
4+
rules: {
5+
'react-hooks/exhaustive-deps': 0,
6+
},
47
};

‎react-native/react-native-hook/Sendbird/.flowconfig‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
; Ignore polyfills
99
node_modules/react-native/Libraries/polyfills/.*
1010

11-
; These should not be required directly
12-
; require from fbjs/lib instead: require('fbjs/lib/warning')
13-
node_modules/warning/.*
14-
1511
; Flow doesn't support platforms
1612
.*/Libraries/Utilities/LoadingView.js
1713

@@ -27,8 +23,9 @@ node_modules/react-native/flow/
2723
[options]
2824
emoji=true
2925

30-
esproposal.optional_chaining=enable
31-
esproposal.nullish_coalescing=enable
26+
exact_by_default=true
27+
28+
format.bracket_spacing=false
3229

3330
module.file_ext=.js
3431
module.file_ext=.json
@@ -44,10 +41,6 @@ suppress_type=$FlowFixMe
4441
suppress_type=$FlowFixMeProps
4542
suppress_type=$FlowFixMeState
4643

47-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50-
5144
[lints]
5245
sketchy-null-number=warn
5346
sketchy-null-mixed=warn
@@ -56,10 +49,8 @@ untyped-type-import=warn
5649
nonstrict-import=warn
5750
deprecated-type=warn
5851
unsafe-getters-setters=warn
59-
inexact-spread=warn
6052
unnecessary-invariant=warn
6153
signature-verification-failure=warn
62-
deprecated-utility=error
6354

6455
[strict]
6556
deprecated-type
@@ -71,4 +62,4 @@ untyped-import
7162
untyped-type-import
7263

7364
[version]
74-
^0.113.0
65+
^0.162.0

‎react-native/react-native-hook/Sendbird/.gitattributes‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎react-native/react-native-hook/Sendbird/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ build/
2828
.gradle
2929
local.properties
3030
*.iml
31+
*.hprof
3132

3233
# node.js
3334
#

‎react-native/react-native-hook/Sendbird/.prettierrc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"semi": true,
66
"singleQuote": true,
77
"quoteProps": "preserve",
8-
"trailingComma": "none",
8+
"trailingComma": "all",
99
"bracketSpacing": true,
1010
"arrowParens": "avoid"
11-
}
11+
}

‎react-native/react-native-hook/Sendbird/App.js‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AppContext } from './src/context';
66
import 'react-native-gesture-handler';
77
import messaging from '@react-native-firebase/messaging';
88
import { NavigationContainer } from '@react-navigation/native';
9-
import { createStackNavigator } from '@react-navigation/stack';
9+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
1010

1111
import Lobby from './src/page/lobby';
1212
import Chat from './src/page/chat';
@@ -15,23 +15,23 @@ import Invite from './src/page/invite';
1515
import Profile from './src/page/profile';
1616

1717
import { onRemoteMessage } from './src/utils';
18-
import AsyncStorage from '@react-native-community/async-storage';
18+
import AsyncStorage from '@react-native-async-storage/async-storage';
1919

20-
const Stack = createStackNavigator();
20+
const Stack = createNativeStackNavigator();
2121

2222
const appId = '9DA1B1F4-0BE6-4DA8-82C5-2E81DAB56F23';
2323
const sendbird = new SendBird({ appId });
2424
sendbird.setErrorFirstCallback(true);
2525

2626
const initialState = {
27-
sendbird
27+
sendbird,
2828
};
2929

3030
const defaultHeaderOptions = {
3131
headerStyle: {
32-
backgroundColor: '#742ddd'
32+
backgroundColor: '#742ddd',
3333
},
34-
headerTintColor: '#fff'
34+
headerTintColor: '#fff',
3535
};
3636

3737
const App = () => {
@@ -49,10 +49,10 @@ const App = () => {
4949
) {
5050
if (Platform.OS === 'ios') {
5151
const token = await messaging().getAPNSToken();
52-
await sendbird.registerAPNSPushTokenForCurrentUser(token);
52+
sendbird.registerAPNSPushTokenForCurrentUser(token);
5353
} else {
5454
const token = await messaging().getToken();
55-
await sendbird.registerGCMPushTokenForCurrentUser(token);
55+
sendbird.registerGCMPushTokenForCurrentUser(token);
5656
}
5757
}
5858
}

‎react-native/react-native-hook/Sendbird/android/.project‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎react-native/react-native-hook/Sendbird/android/app/build.gradle‎

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import com.android.build.OutputFile
2121
* // default. Can be overridden with ENTRY_FILE environment variable.
2222
* entryFile: "index.android.js",
2323
*
24-
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
24+
* // https://reactnative.dev/docs/performance#enable-the-ram-format
2525
* bundleCommand: "ram-bundle",
2626
*
2727
* // whether to bundle JS and assets in debug mode
@@ -115,27 +115,28 @@ def jscFlavor = 'org.webkit:android-jsc:+'
115115
/**
116116
* Whether to enable the Hermes VM.
117117
*
118-
* This should be set on project.ext.react and mirrored here. If it is not set
118+
* This should be set on project.ext.react and that value will be read here. If it is not set
119119
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
120120
* and the benefits of using Hermes will therefore be sharply reduced.
121121
*/
122122
def enableHermes = project.ext.react.get("enableHermes", false);
123123

124+
/**
125+
* Architectures to build native code for in debug.
126+
*/
127+
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
128+
124129
android {
125-
compileSdkVersion rootProject.ext.compileSdkVersion
130+
ndkVersion rootProject.ext.ndkVersion
126131

127-
compileOptions {
128-
sourceCompatibility JavaVersion.VERSION_1_8
129-
targetCompatibility JavaVersion.VERSION_1_8
130-
}
132+
compileSdkVersion rootProject.ext.compileSdkVersion
131133

132134
defaultConfig {
133135
applicationId "com.sendbird.chat.reactnative.sample"
134136
minSdkVersion rootProject.ext.minSdkVersion
135137
targetSdkVersion rootProject.ext.targetSdkVersion
136138
versionCode 1
137139
versionName "1.0"
138-
multiDexEnabled true
139140
}
140141
splits {
141142
abi {
@@ -156,33 +157,32 @@ android {
156157
buildTypes {
157158
debug {
158159
signingConfig signingConfigs.debug
160+
if (nativeArchitectures) {
161+
ndk {
162+
abiFilters nativeArchitectures.split(',')
163+
}
164+
}
159165
}
160166
release {
161167
// Caution! In production, you need to generate your own keystore file.
162-
// see https://facebook.github.io/react-native/docs/signed-apk-android.
168+
// see https://reactnative.dev/docs/signed-apk-android.
163169
signingConfig signingConfigs.debug
164170
minifyEnabled enableProguardInReleaseBuilds
165171
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
166172
}
167173
}
168174

169-
packagingOptions {
170-
pickFirst "lib/armeabi-v7a/libc++_shared.so"
171-
pickFirst "lib/arm64-v8a/libc++_shared.so"
172-
pickFirst "lib/x86/libc++_shared.so"
173-
pickFirst "lib/x86_64/libc++_shared.so"
174-
}
175-
176175
// applicationVariants are e.g. debug, release
177176
applicationVariants.all { variant ->
178177
variant.outputs.each { output ->
179178
// For each separate APK per architecture, set a unique version code as described here:
180179
// https://developer.android.com/studio/build/configure-apk-splits.html
180+
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
181181
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
182182
def abi = output.getFilter(OutputFile.ABI)
183183
if (abi != null) { // null for the universal-debug, universal-release variants
184184
output.versionCodeOverride =
185-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
185+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
186186
}
187187

188188
}
@@ -193,18 +193,17 @@ dependencies {
193193
implementation fileTree(dir: "libs", include: ["*.jar"])
194194
//noinspection GradleDynamicVersion
195195
implementation "com.facebook.react:react-native:+" // From node_modules
196-
compile project(':react-native-fs')
197-
implementation 'com.google.firebase:firebase-messaging:20.1.7'
198-
implementation 'com.google.firebase:firebase-analytics:17.2.2'
199196

200-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
197+
implementation "androidx.appcompat:appcompat:1.0.0"
198+
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
201199

202200
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
203-
exclude group:'com.facebook.fbjni'
201+
exclude group:'com.facebook.fbjni'
204202
}
205203

206204
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
207205
exclude group:'com.facebook.flipper'
206+
exclude group:'com.squareup.okhttp3', module:'okhttp'
208207
}
209208

210209
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
@@ -223,7 +222,7 @@ dependencies {
223222
// Run this once to be able to run the application with BUCK
224223
// puts all compile dependencies into folder libs for BUCK to use
225224
task copyDownloadableDepsToLibs(type: Copy) {
226-
from configurations.compile
225+
from configurations.implementation
227226
into 'libs'
228227
}
229228

‎react-native/react-native-hook/Sendbird/android/app/google-services.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,4 @@
124124
}
125125
],
126126
"configuration_version": "1"
127-
}
127+
}

‎react-native/react-native-hook/Sendbird/android/app/src/debug/AndroidManifest.xml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44

55
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
66

7-
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
7+
<application
8+
android:usesCleartextTraffic="true"
9+
tools:targetApi="28"
10+
tools:ignore="GoogleAppIndexingWarning">
11+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
12+
</application>
813
</manifest>

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL