Skip to content

Commit 722691c

Browse files
authored
chore: fix ws conn (#4582)
* chore: fix ws conn * chore: flutter analyzer * chore: update client api
1 parent 9746852 commit 722691c

File tree

8 files changed

+84
-44
lines changed

8 files changed

+84
-44
lines changed

frontend/appflowy_flutter/lib/env/cloud_env.dart

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ Future<AuthenticatorType> getAuthenticatorType() async {
5454
final value = await getIt<KeyValueStorage>().get(KVKeys.kCloudType);
5555
if (value.isNone() && !integrationMode().isUnitTest) {
5656
// if the cloud type is not set, then set it to AppFlowy Cloud as default.
57-
await useAppFlowyBetaCloudWithURL(kAppflowyCloudUrl);
57+
await useAppFlowyBetaCloudWithURL(
58+
kAppflowyCloudUrl,
59+
AuthenticatorType.appflowyCloud,
60+
);
5861
return AuthenticatorType.appflowyCloud;
5962
}
6063

@@ -70,7 +73,10 @@ Future<AuthenticatorType> getAuthenticatorType() async {
7073
case "4":
7174
return AuthenticatorType.appflowyCloudDevelop;
7275
default:
73-
await useAppFlowyBetaCloudWithURL(kAppflowyCloudUrl);
76+
await useAppFlowyBetaCloudWithURL(
77+
kAppflowyCloudUrl,
78+
AuthenticatorType.appflowyCloud,
79+
);
7480
return AuthenticatorType.appflowyCloud;
7581
}
7682
}
@@ -183,8 +189,11 @@ Future<void> useSelfHostedAppFlowyCloudWithURL(String url) async {
183189
await _setAppFlowyCloudUrl(Some(url));
184190
}
185191

186-
Future<void> useAppFlowyBetaCloudWithURL(String url) async {
187-
await _setAuthenticatorType(AuthenticatorType.appflowyCloud);
192+
Future<void> useAppFlowyBetaCloudWithURL(
193+
String url,
194+
AuthenticatorType authenticatorType,
195+
) async {
196+
await _setAuthenticatorType(authenticatorType);
188197
await _setAppFlowyCloudUrl(Some(url));
189198
}
190199

frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ class AppFlowyCloudViewSetting extends StatelessWidget {
6969
NavigatorAlertDialog(
7070
title: LocaleKeys.settings_menu_restartAppTip.tr(),
7171
confirm: () async {
72-
await useAppFlowyBetaCloudWithURL(serverURL);
72+
await useAppFlowyBetaCloudWithURL(
73+
serverURL,
74+
authenticatorType,
75+
);
7376
restartAppFlowy();
7477
},
7578
).show(context);

frontend/appflowy_tauri/src-tauri/Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/appflowy_tauri/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ custom-protocol = ["tauri/custom-protocol"]
6262
# Run the script:
6363
# scripts/tool/update_client_api_rev.sh new_rev_id
6464
# ⚠️⚠️⚠️️
65-
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "199452d3b77a352c03810d4146b39d76bab0313c" }
65+
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "c1b797a2c46839cb0a1e8c785cb6abbfac01fa13" }
6666
# Please use the following script to update collab.
6767
# Working directory: frontend
6868
#

frontend/appflowy_web/wasm-libs/Cargo.lock

Lines changed: 26 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/appflowy_web/wasm-libs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ lto = false
6262
# Run the script:
6363
# scripts/tool/update_client_api_rev.sh new_rev_id
6464
# ⚠️⚠️⚠️️
65-
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "199452d3b77a352c03810d4146b39d76bab0313c" }
65+
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "c1b797a2c46839cb0a1e8c785cb6abbfac01fa13" }
6666
# Please use the following script to update collab.
6767
# Working directory: frontend
6868
#

0 commit comments

Comments
 (0)