mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: fix ws conn (#4582)
* chore: fix ws conn * chore: flutter analyzer * chore: update client api
This commit is contained in:
17
frontend/appflowy_flutter/lib/env/cloud_env.dart
vendored
17
frontend/appflowy_flutter/lib/env/cloud_env.dart
vendored
@ -54,7 +54,10 @@ Future<AuthenticatorType> getAuthenticatorType() async {
|
||||
final value = await getIt<KeyValueStorage>().get(KVKeys.kCloudType);
|
||||
if (value.isNone() && !integrationMode().isUnitTest) {
|
||||
// if the cloud type is not set, then set it to AppFlowy Cloud as default.
|
||||
await useAppFlowyBetaCloudWithURL(kAppflowyCloudUrl);
|
||||
await useAppFlowyBetaCloudWithURL(
|
||||
kAppflowyCloudUrl,
|
||||
AuthenticatorType.appflowyCloud,
|
||||
);
|
||||
return AuthenticatorType.appflowyCloud;
|
||||
}
|
||||
|
||||
@ -70,7 +73,10 @@ Future<AuthenticatorType> getAuthenticatorType() async {
|
||||
case "4":
|
||||
return AuthenticatorType.appflowyCloudDevelop;
|
||||
default:
|
||||
await useAppFlowyBetaCloudWithURL(kAppflowyCloudUrl);
|
||||
await useAppFlowyBetaCloudWithURL(
|
||||
kAppflowyCloudUrl,
|
||||
AuthenticatorType.appflowyCloud,
|
||||
);
|
||||
return AuthenticatorType.appflowyCloud;
|
||||
}
|
||||
}
|
||||
@ -183,8 +189,11 @@ Future<void> useSelfHostedAppFlowyCloudWithURL(String url) async {
|
||||
await _setAppFlowyCloudUrl(Some(url));
|
||||
}
|
||||
|
||||
Future<void> useAppFlowyBetaCloudWithURL(String url) async {
|
||||
await _setAuthenticatorType(AuthenticatorType.appflowyCloud);
|
||||
Future<void> useAppFlowyBetaCloudWithURL(
|
||||
String url,
|
||||
AuthenticatorType authenticatorType,
|
||||
) async {
|
||||
await _setAuthenticatorType(authenticatorType);
|
||||
await _setAppFlowyCloudUrl(Some(url));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user