refactor: sdk 1.0
This commit is contained in:
parent
ca4db07d83
commit
e548d8f895
23 changed files with 1775 additions and 175 deletions
5
.github/workflows/integrate.yaml
vendored
5
.github/workflows/integrate.yaml
vendored
|
|
@ -43,6 +43,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||||
cache: true
|
cache: true
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- run: flutter build apk --debug
|
- run: flutter build apk --debug
|
||||||
|
|
||||||
|
|
@ -55,6 +56,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||||
cache: true
|
cache: true
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
|
- run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- name: Prepare web
|
- name: Prepare web
|
||||||
run: ./scripts/prepare-web.sh
|
run: ./scripts/prepare-web.sh
|
||||||
|
|
@ -74,6 +77,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git
|
git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git
|
||||||
./flutter/bin/flutter doctor
|
./flutter/bin/flutter doctor
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
- run: ./flutter/bin/flutter pub get
|
- run: ./flutter/bin/flutter pub get
|
||||||
- run: ./flutter/bin/flutter build linux --target-platform linux-${{ matrix.arch }}
|
- run: ./flutter/bin/flutter build linux --target-platform linux-${{ matrix.arch }}
|
||||||
|
|
||||||
|
|
@ -91,5 +95,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
xcode-version: latest
|
xcode-version: latest
|
||||||
- run: brew install sqlcipher
|
- run: brew install sqlcipher
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- run: flutter build ios --no-codesign
|
- run: flutter build ios --no-codesign
|
||||||
|
|
|
||||||
3
.github/workflows/main_deploy.yaml
vendored
3
.github/workflows/main_deploy.yaml
vendored
|
|
@ -19,6 +19,8 @@ jobs:
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
|
- run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- name: Prepare web
|
- name: Prepare web
|
||||||
run: ./scripts/prepare-web.sh
|
run: ./scripts/prepare-web.sh
|
||||||
|
|
@ -50,6 +52,7 @@ jobs:
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: '3.3'
|
ruby-version: '3.3'
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
- name: Install Fastlane
|
- name: Install Fastlane
|
||||||
run: gem install fastlane -NV
|
run: gem install fastlane -NV
|
||||||
- name: Apply Google Services Patch
|
- name: Apply Google Services Patch
|
||||||
|
|
|
||||||
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
|
|
@ -25,6 +25,7 @@ jobs:
|
||||||
cache: true
|
cache: true
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt-get update && sudo apt-get install nodejs -y
|
run: sudo apt-get update && sudo apt-get install nodejs -y
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- name: Prepare web
|
- name: Prepare web
|
||||||
run: ./scripts/prepare-web.sh
|
run: ./scripts/prepare-web.sh
|
||||||
|
|
@ -81,6 +82,7 @@ jobs:
|
||||||
cache: true
|
cache: true
|
||||||
- name: Apply Google Services Patch
|
- name: Apply Google Services Patch
|
||||||
run: git apply ./scripts/enable-android-google-services.patch
|
run: git apply ./scripts/enable-android-google-services.patch
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- name: Prepare Android Release Build
|
- name: Prepare Android Release Build
|
||||||
env:
|
env:
|
||||||
|
|
@ -113,6 +115,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git
|
git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git
|
||||||
./flutter/bin/flutter doctor
|
./flutter/bin/flutter doctor
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
- run: ./flutter/bin/flutter pub get
|
- run: ./flutter/bin/flutter pub get
|
||||||
- run: ./flutter/bin/flutter build linux --target-platform linux-${{ matrix.arch }}
|
- run: ./flutter/bin/flutter build linux --target-platform linux-${{ matrix.arch }}
|
||||||
- name: Create archive
|
- name: Create archive
|
||||||
|
|
@ -144,6 +147,7 @@ jobs:
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: '3.3'
|
ruby-version: '3.3'
|
||||||
|
- uses: moonrepo/setup-rust@v1
|
||||||
- name: Install Fastlane
|
- name: Install Fastlane
|
||||||
run: gem install fastlane -NV
|
run: gem install fastlane -NV
|
||||||
- name: Apply Google Services Patch
|
- name: Apply Google Services Patch
|
||||||
|
|
|
||||||
1546
.gitignore
vendored
1546
.gitignore
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -308,14 +308,10 @@
|
||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "[CP] Copy Pods Resources";
|
name = "[CP] Copy Pods Resources";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
);
|
);
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||||
|
|
@ -404,14 +400,10 @@
|
||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
);
|
);
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
<Testables>
|
<Testables>
|
||||||
</Testables>
|
</Testables>
|
||||||
|
|
@ -45,6 +46,7 @@
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import 'dart:async';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
import 'package:matrix/matrix.dart';
|
||||||
|
|
||||||
import 'package:fluffychat/config/themes.dart';
|
import 'package:fluffychat/config/themes.dart';
|
||||||
import 'package:fluffychat/pages/archive/archive.dart';
|
import 'package:fluffychat/pages/archive/archive.dart';
|
||||||
|
|
@ -73,7 +74,7 @@ abstract class AppRoutes {
|
||||||
pageBuilder: (context, state) => defaultPageBuilder(
|
pageBuilder: (context, state) => defaultPageBuilder(
|
||||||
context,
|
context,
|
||||||
state,
|
state,
|
||||||
const Login(),
|
Login(client: state.extra as Client),
|
||||||
),
|
),
|
||||||
redirect: loggedInRedirect,
|
redirect: loggedInRedirect,
|
||||||
),
|
),
|
||||||
|
|
@ -260,7 +261,7 @@ abstract class AppRoutes {
|
||||||
pageBuilder: (context, state) => defaultPageBuilder(
|
pageBuilder: (context, state) => defaultPageBuilder(
|
||||||
context,
|
context,
|
||||||
state,
|
state,
|
||||||
const Login(),
|
Login(client: state.extra as Client),
|
||||||
),
|
),
|
||||||
redirect: loggedOutRedirect,
|
redirect: loggedOutRedirect,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||||
|
import 'package:flutter_vodozemac/flutter_vodozemac.dart' as vod;
|
||||||
import 'package:matrix/matrix.dart';
|
import 'package:matrix/matrix.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
|
|
@ -20,6 +21,8 @@ void main() async {
|
||||||
// widget bindings are initialized already.
|
// widget bindings are initialized already.
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
|
await vod.init();
|
||||||
|
|
||||||
Logs().nativeColors = !PlatformInfos.isIOS;
|
Logs().nativeColors = !PlatformInfos.isIOS;
|
||||||
final store = await SharedPreferences.getInstance();
|
final store = await SharedPreferences.getInstance();
|
||||||
final clients = await ClientManager.getClients(store: store);
|
final clients = await ClientManager.getClients(store: store);
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,11 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
||||||
homeserverController.text.trim().toLowerCase().replaceAll(' ', '-');
|
homeserverController.text.trim().toLowerCase().replaceAll(' ', '-');
|
||||||
|
|
||||||
if (homeserverInput.isEmpty) {
|
if (homeserverInput.isEmpty) {
|
||||||
|
final client = await Matrix.of(context).getLoginClient();
|
||||||
setState(() {
|
setState(() {
|
||||||
error = loginFlows = null;
|
error = loginFlows = null;
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
Matrix.of(context).getLoginClient().homeserver = null;
|
client.homeserver = null;
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -88,7 +89,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
||||||
if (homeserver.scheme.isEmpty) {
|
if (homeserver.scheme.isEmpty) {
|
||||||
homeserver = Uri.https(homeserverInput, '');
|
homeserver = Uri.https(homeserverInput, '');
|
||||||
}
|
}
|
||||||
final client = Matrix.of(context).getLoginClient();
|
final client = await Matrix.of(context).getLoginClient();
|
||||||
final (_, _, loginFlows) = await client.checkHomeserver(homeserver);
|
final (_, _, loginFlows) = await client.checkHomeserver(homeserver);
|
||||||
this.loginFlows = loginFlows;
|
this.loginFlows = loginFlows;
|
||||||
if (supportsSso && !legacyPasswordLogin) {
|
if (supportsSso && !legacyPasswordLogin) {
|
||||||
|
|
@ -105,6 +106,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
||||||
}
|
}
|
||||||
context.push(
|
context.push(
|
||||||
'${GoRouter.of(context).routeInformationProvider.value.uri.path}/login',
|
'${GoRouter.of(context).routeInformationProvider.value.uri.path}/login',
|
||||||
|
extra: client,
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setState(
|
setState(
|
||||||
|
|
@ -142,8 +144,8 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
||||||
: isDefaultPlatform
|
: isDefaultPlatform
|
||||||
? '${AppConfig.appOpenUrlScheme.toLowerCase()}://login'
|
? '${AppConfig.appOpenUrlScheme.toLowerCase()}://login'
|
||||||
: 'http://localhost:3001//login';
|
: 'http://localhost:3001//login';
|
||||||
|
final client = await Matrix.of(context).getLoginClient();
|
||||||
final url = Matrix.of(context).getLoginClient().homeserver!.replace(
|
final url = client.homeserver!.replace(
|
||||||
path: '/_matrix/client/v3/login/sso/redirect',
|
path: '/_matrix/client/v3/login/sso/redirect',
|
||||||
queryParameters: {'redirectUrl': redirectUrl},
|
queryParameters: {'redirectUrl': redirectUrl},
|
||||||
);
|
);
|
||||||
|
|
@ -164,11 +166,12 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await Matrix.of(context).getLoginClient().login(
|
final client = await Matrix.of(context).getLoginClient();
|
||||||
LoginType.mLoginToken,
|
client.login(
|
||||||
token: token,
|
LoginType.mLoginToken,
|
||||||
initialDeviceDisplayName: PlatformInfos.clientName,
|
token: token,
|
||||||
);
|
initialDeviceDisplayName: PlatformInfos.clientName,
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setState(() {
|
setState(() {
|
||||||
error = e.toLocalizedString(context);
|
error = e.toLocalizedString(context);
|
||||||
|
|
@ -200,7 +203,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
final client = Matrix.of(context).getLoginClient();
|
final client = await Matrix.of(context).getLoginClient();
|
||||||
await client.importDump(String.fromCharCodes(await file.readAsBytes()));
|
await client.importDump(String.fromCharCodes(await file.readAsBytes()));
|
||||||
Matrix.of(context).initMatrix();
|
Matrix.of(context).initMatrix();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ import '../../utils/platform_infos.dart';
|
||||||
import 'login_view.dart';
|
import 'login_view.dart';
|
||||||
|
|
||||||
class Login extends StatefulWidget {
|
class Login extends StatefulWidget {
|
||||||
const Login({super.key});
|
final Client client;
|
||||||
|
const Login({required this.client, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
LoginController createState() => LoginController();
|
LoginController createState() => LoginController();
|
||||||
|
|
@ -68,17 +69,18 @@ class LoginController extends State<Login> {
|
||||||
} else {
|
} else {
|
||||||
identifier = AuthenticationUserIdentifier(user: username);
|
identifier = AuthenticationUserIdentifier(user: username);
|
||||||
}
|
}
|
||||||
await matrix.getLoginClient().login(
|
final client = await matrix.getLoginClient();
|
||||||
LoginType.mLoginPassword,
|
client.login(
|
||||||
identifier: identifier,
|
LoginType.mLoginPassword,
|
||||||
// To stay compatible with older server versions
|
identifier: identifier,
|
||||||
// ignore: deprecated_member_use
|
// To stay compatible with older server versions
|
||||||
user: identifier.type == AuthenticationIdentifierTypes.userId
|
// ignore: deprecated_member_use
|
||||||
? username
|
user: identifier.type == AuthenticationIdentifierTypes.userId
|
||||||
: null,
|
? username
|
||||||
password: passwordController.text,
|
: null,
|
||||||
initialDeviceDisplayName: PlatformInfos.clientName,
|
password: passwordController.text,
|
||||||
);
|
initialDeviceDisplayName: PlatformInfos.clientName,
|
||||||
|
);
|
||||||
} on MatrixException catch (exception) {
|
} on MatrixException catch (exception) {
|
||||||
setState(() => passwordError = exception.errorMessage);
|
setState(() => passwordError = exception.errorMessage);
|
||||||
return setState(() => loading = false);
|
return setState(() => loading = false);
|
||||||
|
|
@ -103,14 +105,13 @@ class LoginController extends State<Login> {
|
||||||
void _checkWellKnown(String userId) async {
|
void _checkWellKnown(String userId) async {
|
||||||
if (mounted) setState(() => usernameError = null);
|
if (mounted) setState(() => usernameError = null);
|
||||||
if (!userId.isValidMatrixId) return;
|
if (!userId.isValidMatrixId) return;
|
||||||
final oldHomeserver = Matrix.of(context).getLoginClient().homeserver;
|
final oldHomeserver = widget.client.homeserver;
|
||||||
try {
|
try {
|
||||||
var newDomain = Uri.https(userId.domain!, '');
|
var newDomain = Uri.https(userId.domain!, '');
|
||||||
Matrix.of(context).getLoginClient().homeserver = newDomain;
|
widget.client.homeserver = newDomain;
|
||||||
DiscoveryInformation? wellKnownInformation;
|
DiscoveryInformation? wellKnownInformation;
|
||||||
try {
|
try {
|
||||||
wellKnownInformation =
|
wellKnownInformation = await widget.client.getWellknown();
|
||||||
await Matrix.of(context).getLoginClient().getWellknown();
|
|
||||||
if (wellKnownInformation.mHomeserver.baseUrl.toString().isNotEmpty) {
|
if (wellKnownInformation.mHomeserver.baseUrl.toString().isNotEmpty) {
|
||||||
newDomain = wellKnownInformation.mHomeserver.baseUrl;
|
newDomain = wellKnownInformation.mHomeserver.baseUrl;
|
||||||
}
|
}
|
||||||
|
|
@ -118,10 +119,10 @@ class LoginController extends State<Login> {
|
||||||
// do nothing, newDomain is already set to a reasonable fallback
|
// do nothing, newDomain is already set to a reasonable fallback
|
||||||
}
|
}
|
||||||
if (newDomain != oldHomeserver) {
|
if (newDomain != oldHomeserver) {
|
||||||
await Matrix.of(context).getLoginClient().checkHomeserver(newDomain);
|
await widget.client.checkHomeserver(newDomain);
|
||||||
|
|
||||||
if (Matrix.of(context).getLoginClient().homeserver == null) {
|
if (widget.client.homeserver == null) {
|
||||||
Matrix.of(context).getLoginClient().homeserver = oldHomeserver;
|
widget.client.homeserver = oldHomeserver;
|
||||||
// okay, the server we checked does not appear to be a matrix server
|
// okay, the server we checked does not appear to be a matrix server
|
||||||
Logs().v(
|
Logs().v(
|
||||||
'$newDomain is not running a homeserver, asking to use $oldHomeserver',
|
'$newDomain is not running a homeserver, asking to use $oldHomeserver',
|
||||||
|
|
@ -144,13 +145,13 @@ class LoginController extends State<Login> {
|
||||||
usernameError = null;
|
usernameError = null;
|
||||||
if (mounted) setState(() {});
|
if (mounted) setState(() {});
|
||||||
} else {
|
} else {
|
||||||
Matrix.of(context).getLoginClient().homeserver = oldHomeserver;
|
widget.client.homeserver = oldHomeserver;
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Matrix.of(context).getLoginClient().homeserver = oldHomeserver;
|
widget.client.homeserver = oldHomeserver;
|
||||||
usernameError = e.toLocalizedString(context);
|
usernameError = e.toLocalizedString(context);
|
||||||
if (mounted) setState(() {});
|
if (mounted) setState(() {});
|
||||||
}
|
}
|
||||||
|
|
@ -173,12 +174,11 @@ class LoginController extends State<Login> {
|
||||||
final clientSecret = DateTime.now().millisecondsSinceEpoch.toString();
|
final clientSecret = DateTime.now().millisecondsSinceEpoch.toString();
|
||||||
final response = await showFutureLoadingDialog(
|
final response = await showFutureLoadingDialog(
|
||||||
context: context,
|
context: context,
|
||||||
future: () =>
|
future: () => widget.client.requestTokenToResetPasswordEmail(
|
||||||
Matrix.of(context).getLoginClient().requestTokenToResetPasswordEmail(
|
clientSecret,
|
||||||
clientSecret,
|
input,
|
||||||
input,
|
sendAttempt++,
|
||||||
sendAttempt++,
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
if (response.error != null) return;
|
if (response.error != null) return;
|
||||||
final password = await showTextInputDialog(
|
final password = await showTextInputDialog(
|
||||||
|
|
@ -215,11 +215,11 @@ class LoginController extends State<Login> {
|
||||||
};
|
};
|
||||||
final success = await showFutureLoadingDialog(
|
final success = await showFutureLoadingDialog(
|
||||||
context: context,
|
context: context,
|
||||||
future: () => Matrix.of(context).getLoginClient().request(
|
future: () => widget.client.request(
|
||||||
RequestType.POST,
|
RequestType.POST,
|
||||||
'/client/v3/account/password',
|
'/client/v3/account/password',
|
||||||
data: data,
|
data: data,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (success.error == null) {
|
if (success.error == null) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,7 @@ class LoginView extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
|
|
||||||
final homeserver = Matrix.of(context)
|
final homeserver = controller.widget.client.homeserver
|
||||||
.getLoginClient()
|
|
||||||
.homeserver
|
|
||||||
.toString()
|
.toString()
|
||||||
.replaceFirst('https://', '');
|
.replaceFirst('https://', '');
|
||||||
final title = L10n.of(context).logInTo(homeserver);
|
final title = L10n.of(context).logInTo(homeserver);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ extension ClientDownloadContentExtension on Client {
|
||||||
)
|
)
|
||||||
: mxc;
|
: mxc;
|
||||||
|
|
||||||
final cachedData = await database?.getFile(cacheKey);
|
final cachedData = await database.getFile(cacheKey);
|
||||||
if (cachedData != null) return cachedData;
|
if (cachedData != null) return cachedData;
|
||||||
|
|
||||||
final httpUri = isThumbnail
|
final httpUri = isThumbnail
|
||||||
|
|
@ -55,7 +55,7 @@ extension ClientDownloadContentExtension on Client {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await database?.storeFile(cacheKey, imageData, 0);
|
await database.storeFile(cacheKey, imageData, 0);
|
||||||
|
|
||||||
return imageData;
|
return imageData;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import 'package:flutter/foundation.dart';
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:desktop_notifications/desktop_notifications.dart';
|
import 'package:desktop_notifications/desktop_notifications.dart';
|
||||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||||
|
import 'package:flutter_vodozemac/flutter_vodozemac.dart' as vod;
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
import 'package:matrix/encryption/utils/key_verification.dart';
|
import 'package:matrix/encryption/utils/key_verification.dart';
|
||||||
import 'package:matrix/matrix.dart';
|
import 'package:matrix/matrix.dart';
|
||||||
|
|
@ -46,7 +47,7 @@ abstract class ClientManager {
|
||||||
await store.setStringList(clientNamespace, clientNames.toList());
|
await store.setStringList(clientNamespace, clientNames.toList());
|
||||||
}
|
}
|
||||||
final clients =
|
final clients =
|
||||||
clientNames.map((name) => createClient(name, store)).toList();
|
await Future.wait(clientNames.map((name) => createClient(name, store)));
|
||||||
if (initialize) {
|
if (initialize) {
|
||||||
await Future.wait(
|
await Future.wait(
|
||||||
clients.map(
|
clients.map(
|
||||||
|
|
@ -98,9 +99,15 @@ abstract class ClientManager {
|
||||||
|
|
||||||
static NativeImplementations get nativeImplementations => kIsWeb
|
static NativeImplementations get nativeImplementations => kIsWeb
|
||||||
? const NativeImplementationsDummy()
|
? const NativeImplementationsDummy()
|
||||||
: NativeImplementationsIsolate(compute);
|
: NativeImplementationsIsolate(
|
||||||
|
compute,
|
||||||
|
vodozemacInit: vod.init,
|
||||||
|
);
|
||||||
|
|
||||||
static Client createClient(String clientName, SharedPreferences store) {
|
static Future<Client> createClient(
|
||||||
|
String clientName,
|
||||||
|
SharedPreferences store,
|
||||||
|
) async {
|
||||||
final shareKeysWith = AppSettings.shareKeysWith.getItem(store);
|
final shareKeysWith = AppSettings.shareKeysWith.getItem(store);
|
||||||
final enableSoftLogout = AppSettings.enableSoftLogout.getItem(store);
|
final enableSoftLogout = AppSettings.enableSoftLogout.getItem(store);
|
||||||
|
|
||||||
|
|
@ -118,7 +125,7 @@ abstract class ClientManager {
|
||||||
'im.ponies.room_emotes',
|
'im.ponies.room_emotes',
|
||||||
},
|
},
|
||||||
logLevel: kReleaseMode ? Level.warning : Level.verbose,
|
logLevel: kReleaseMode ? Level.warning : Level.verbose,
|
||||||
databaseBuilder: flutterMatrixSdkDatabaseBuilder,
|
database: await flutterMatrixSdkDatabaseBuilder(clientName),
|
||||||
supportedLoginTypes: {
|
supportedLoginTypes: {
|
||||||
AuthenticationTypes.password,
|
AuthenticationTypes.password,
|
||||||
AuthenticationTypes.sso,
|
AuthenticationTypes.sso,
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,11 @@ extension LocalizedBody on Event {
|
||||||
|
|
||||||
bool get isAttachmentSmallEnough =>
|
bool get isAttachmentSmallEnough =>
|
||||||
infoMap['size'] is int &&
|
infoMap['size'] is int &&
|
||||||
infoMap['size'] < room.client.database!.maxFileSize;
|
infoMap['size'] < room.client.database.maxFileSize;
|
||||||
|
|
||||||
bool get isThumbnailSmallEnough =>
|
bool get isThumbnailSmallEnough =>
|
||||||
thumbnailInfoMap['size'] is int &&
|
thumbnailInfoMap['size'] is int &&
|
||||||
thumbnailInfoMap['size'] < room.client.database!.maxFileSize;
|
thumbnailInfoMap['size'] < room.client.database.maxFileSize;
|
||||||
|
|
||||||
bool get showThumbnail =>
|
bool get showThumbnail =>
|
||||||
[MessageTypes.Image, MessageTypes.Sticker, MessageTypes.Video]
|
[MessageTypes.Image, MessageTypes.Sticker, MessageTypes.Video]
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@ import 'cipher.dart';
|
||||||
import 'sqlcipher_stub.dart'
|
import 'sqlcipher_stub.dart'
|
||||||
if (dart.library.io) 'package:sqlcipher_flutter_libs/sqlcipher_flutter_libs.dart';
|
if (dart.library.io) 'package:sqlcipher_flutter_libs/sqlcipher_flutter_libs.dart';
|
||||||
|
|
||||||
Future<DatabaseApi> flutterMatrixSdkDatabaseBuilder(Client client) async {
|
Future<DatabaseApi> flutterMatrixSdkDatabaseBuilder(String clientName) async {
|
||||||
MatrixSdkDatabase? database;
|
MatrixSdkDatabase? database;
|
||||||
try {
|
try {
|
||||||
database = await _constructDatabase(client);
|
database = await _constructDatabase(clientName);
|
||||||
await database.open();
|
await database.open();
|
||||||
return database;
|
return database;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
|
|
@ -36,7 +36,7 @@ Future<DatabaseApi> flutterMatrixSdkDatabaseBuilder(Client client) async {
|
||||||
|
|
||||||
// Delete database file:
|
// Delete database file:
|
||||||
if (database == null && !kIsWeb) {
|
if (database == null && !kIsWeb) {
|
||||||
final dbFile = File(await _getDatabasePath(client.clientName));
|
final dbFile = File(await _getDatabasePath(clientName));
|
||||||
if (await dbFile.exists()) await dbFile.delete();
|
if (await dbFile.exists()) await dbFile.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -58,10 +58,10 @@ Future<DatabaseApi> flutterMatrixSdkDatabaseBuilder(Client client) async {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<MatrixSdkDatabase> _constructDatabase(Client client) async {
|
Future<MatrixSdkDatabase> _constructDatabase(String clientName) async {
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
html.window.navigator.storage?.persist();
|
html.window.navigator.storage?.persist();
|
||||||
return MatrixSdkDatabase(client.clientName);
|
return await MatrixSdkDatabase.init(clientName);
|
||||||
}
|
}
|
||||||
|
|
||||||
final cipher = await getDatabaseCipher();
|
final cipher = await getDatabaseCipher();
|
||||||
|
|
@ -75,7 +75,7 @@ Future<MatrixSdkDatabase> _constructDatabase(Client client) async {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final path = await _getDatabasePath(client.clientName);
|
final path = await _getDatabasePath(clientName);
|
||||||
|
|
||||||
// fix dlopen for old Android
|
// fix dlopen for old Android
|
||||||
await applyWorkaroundToOpenSqlCipherOnOldAndroidVersions();
|
await applyWorkaroundToOpenSqlCipherOnOldAndroidVersions();
|
||||||
|
|
@ -84,7 +84,7 @@ Future<MatrixSdkDatabase> _constructDatabase(Client client) async {
|
||||||
createDatabaseFactoryFfi(ffiInit: SQfLiteEncryptionHelper.ffiInit);
|
createDatabaseFactoryFfi(ffiInit: SQfLiteEncryptionHelper.ffiInit);
|
||||||
|
|
||||||
// migrate from potential previous SQLite database path to current one
|
// migrate from potential previous SQLite database path to current one
|
||||||
await _migrateLegacyLocation(path, client.clientName);
|
await _migrateLegacyLocation(path, clientName);
|
||||||
|
|
||||||
// required for [getDatabasesPath]
|
// required for [getDatabasesPath]
|
||||||
databaseFactory = factory;
|
databaseFactory = factory;
|
||||||
|
|
@ -111,8 +111,8 @@ Future<MatrixSdkDatabase> _constructDatabase(Client client) async {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
return MatrixSdkDatabase(
|
return await MatrixSdkDatabase.init(
|
||||||
client.clientName,
|
clientName,
|
||||||
database: database,
|
database: database,
|
||||||
maxFileSize: 1000 * 1000 * 10,
|
maxFileSize: 1000 * 1000 * 10,
|
||||||
fileStorageLocation: fileStorageLocation?.uri,
|
fileStorageLocation: fileStorageLocation?.uri,
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
||||||
BackgroundPush? backgroundPush;
|
BackgroundPush? backgroundPush;
|
||||||
|
|
||||||
Client get client {
|
Client get client {
|
||||||
if (widget.clients.isEmpty) {
|
|
||||||
widget.clients.add(getLoginClient());
|
|
||||||
}
|
|
||||||
if (_activeClient < 0 || _activeClient >= widget.clients.length) {
|
if (_activeClient < 0 || _activeClient >= widget.clients.length) {
|
||||||
return currentBundle!.first!;
|
return currentBundle!.first!;
|
||||||
}
|
}
|
||||||
|
|
@ -152,29 +149,31 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
||||||
AudioPlayer? audioPlayer;
|
AudioPlayer? audioPlayer;
|
||||||
final ValueNotifier<String?> voiceMessageEventId = ValueNotifier(null);
|
final ValueNotifier<String?> voiceMessageEventId = ValueNotifier(null);
|
||||||
|
|
||||||
Client getLoginClient() {
|
Future<Client> getLoginClient() async {
|
||||||
if (widget.clients.isNotEmpty && !client.isLogged()) {
|
if (widget.clients.isNotEmpty && !client.isLogged()) {
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
final candidate = _loginClientCandidate ??= ClientManager.createClient(
|
final candidate =
|
||||||
|
_loginClientCandidate ??= await ClientManager.createClient(
|
||||||
'${AppConfig.applicationName}-${DateTime.now().millisecondsSinceEpoch}',
|
'${AppConfig.applicationName}-${DateTime.now().millisecondsSinceEpoch}',
|
||||||
store,
|
store,
|
||||||
)..onLoginStateChanged
|
)
|
||||||
.stream
|
..onLoginStateChanged
|
||||||
.where((l) => l == LoginState.loggedIn)
|
.stream
|
||||||
.first
|
.where((l) => l == LoginState.loggedIn)
|
||||||
.then((_) {
|
.first
|
||||||
if (!widget.clients.contains(_loginClientCandidate)) {
|
.then((_) {
|
||||||
widget.clients.add(_loginClientCandidate!);
|
if (!widget.clients.contains(_loginClientCandidate)) {
|
||||||
}
|
widget.clients.add(_loginClientCandidate!);
|
||||||
ClientManager.addClientNameToStore(
|
}
|
||||||
_loginClientCandidate!.clientName,
|
ClientManager.addClientNameToStore(
|
||||||
store,
|
_loginClientCandidate!.clientName,
|
||||||
);
|
store,
|
||||||
_registerSubs(_loginClientCandidate!.clientName);
|
);
|
||||||
_loginClientCandidate = null;
|
_registerSubs(_loginClientCandidate!.clientName);
|
||||||
FluffyChatApp.router.go('/rooms');
|
_loginClientCandidate = null;
|
||||||
});
|
FluffyChatApp.router.go('/rooms');
|
||||||
|
});
|
||||||
return candidate;
|
return candidate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
flutter_vodozemac
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,17 @@ PODS:
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- emoji_picker_flutter (0.0.1):
|
- emoji_picker_flutter (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- file_picker (0.0.1):
|
||||||
|
- FlutterMacOS
|
||||||
- file_selector_macos (0.0.1):
|
- file_selector_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- flutter_local_notifications (0.0.1):
|
- flutter_local_notifications (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- flutter_new_badger (0.0.1):
|
- flutter_new_badger (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- flutter_secure_storage_macos (6.1.1):
|
- flutter_secure_storage_macos (6.1.3):
|
||||||
|
- FlutterMacOS
|
||||||
|
- flutter_vodozemac (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- flutter_web_auth_2 (3.0.0):
|
- flutter_web_auth_2 (3.0.0):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
|
@ -26,8 +30,10 @@ PODS:
|
||||||
- WebRTC-SDK (= 125.6422.06)
|
- WebRTC-SDK (= 125.6422.06)
|
||||||
- FlutterMacOS (1.0.0)
|
- FlutterMacOS (1.0.0)
|
||||||
- geolocator_apple (1.2.0):
|
- geolocator_apple (1.2.0):
|
||||||
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- just_audio (0.0.1):
|
- just_audio (0.0.1):
|
||||||
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- package_info_plus (0.0.1):
|
- package_info_plus (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
|
@ -36,25 +42,24 @@ PODS:
|
||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- record_darwin (1.0.0):
|
- record_macos (1.0.0):
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- share_plus (0.0.1):
|
- share_plus (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- sqflite (0.0.3):
|
- sqflite_darwin (0.0.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- SQLCipher (4.5.7):
|
- SQLCipher (4.8.0):
|
||||||
- SQLCipher/standard (= 4.5.7)
|
- SQLCipher/standard (= 4.8.0)
|
||||||
- SQLCipher/common (4.5.7)
|
- SQLCipher/common (4.8.0)
|
||||||
- SQLCipher/standard (4.5.7):
|
- SQLCipher/standard (4.8.0):
|
||||||
- SQLCipher/common
|
- SQLCipher/common
|
||||||
- sqlcipher_flutter_libs (0.0.1):
|
- sqlcipher_flutter_libs (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- SQLCipher (~> 4.5.7)
|
- SQLCipher (~> 4.8.0)
|
||||||
- url_launcher_macos (0.0.1):
|
- url_launcher_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- video_compress (0.3.0):
|
- video_compress (0.3.0):
|
||||||
|
|
@ -75,22 +80,24 @@ DEPENDENCIES:
|
||||||
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
|
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
|
||||||
- dynamic_color (from `Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos`)
|
- dynamic_color (from `Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos`)
|
||||||
- emoji_picker_flutter (from `Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos`)
|
- emoji_picker_flutter (from `Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos`)
|
||||||
|
- file_picker (from `Flutter/ephemeral/.symlinks/plugins/file_picker/macos`)
|
||||||
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
||||||
- flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`)
|
- flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`)
|
||||||
- flutter_new_badger (from `Flutter/ephemeral/.symlinks/plugins/flutter_new_badger/macos`)
|
- flutter_new_badger (from `Flutter/ephemeral/.symlinks/plugins/flutter_new_badger/macos`)
|
||||||
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
|
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
|
||||||
|
- flutter_vodozemac (from `Flutter/ephemeral/.symlinks/plugins/flutter_vodozemac/macos`)
|
||||||
- flutter_web_auth_2 (from `Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos`)
|
- flutter_web_auth_2 (from `Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos`)
|
||||||
- flutter_webrtc (from `Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos`)
|
- flutter_webrtc (from `Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos`)
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
- geolocator_apple (from `Flutter/ephemeral/.symlinks/plugins/geolocator_apple/macos`)
|
- geolocator_apple (from `Flutter/ephemeral/.symlinks/plugins/geolocator_apple/darwin`)
|
||||||
- just_audio (from `Flutter/ephemeral/.symlinks/plugins/just_audio/macos`)
|
- just_audio (from `Flutter/ephemeral/.symlinks/plugins/just_audio/darwin`)
|
||||||
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
||||||
- pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/macos`)
|
- pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/macos`)
|
||||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- record_darwin (from `Flutter/ephemeral/.symlinks/plugins/record_darwin/macos`)
|
- record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`)
|
||||||
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
|
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
|
||||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/darwin`)
|
- sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`)
|
||||||
- sqlcipher_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/sqlcipher_flutter_libs/macos`)
|
- sqlcipher_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/sqlcipher_flutter_libs/macos`)
|
||||||
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||||
- video_compress (from `Flutter/ephemeral/.symlinks/plugins/video_compress/macos`)
|
- video_compress (from `Flutter/ephemeral/.symlinks/plugins/video_compress/macos`)
|
||||||
|
|
@ -116,6 +123,8 @@ EXTERNAL SOURCES:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos
|
||||||
emoji_picker_flutter:
|
emoji_picker_flutter:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos
|
||||||
|
file_picker:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/file_picker/macos
|
||||||
file_selector_macos:
|
file_selector_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
||||||
flutter_local_notifications:
|
flutter_local_notifications:
|
||||||
|
|
@ -124,6 +133,8 @@ EXTERNAL SOURCES:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_new_badger/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/flutter_new_badger/macos
|
||||||
flutter_secure_storage_macos:
|
flutter_secure_storage_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
|
||||||
|
flutter_vodozemac:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/flutter_vodozemac/macos
|
||||||
flutter_web_auth_2:
|
flutter_web_auth_2:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos
|
||||||
flutter_webrtc:
|
flutter_webrtc:
|
||||||
|
|
@ -131,23 +142,23 @@ EXTERNAL SOURCES:
|
||||||
FlutterMacOS:
|
FlutterMacOS:
|
||||||
:path: Flutter/ephemeral
|
:path: Flutter/ephemeral
|
||||||
geolocator_apple:
|
geolocator_apple:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/geolocator_apple/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/geolocator_apple/darwin
|
||||||
just_audio:
|
just_audio:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/just_audio/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/just_audio/darwin
|
||||||
package_info_plus:
|
package_info_plus:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
||||||
pasteboard:
|
pasteboard:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/pasteboard/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/pasteboard/macos
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||||
record_darwin:
|
record_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/record_darwin/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/record_macos/macos
|
||||||
share_plus:
|
share_plus:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
||||||
sqflite:
|
sqflite_darwin:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/darwin
|
:path: Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin
|
||||||
sqlcipher_flutter_libs:
|
sqlcipher_flutter_libs:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/sqlcipher_flutter_libs/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/sqlcipher_flutter_libs/macos
|
||||||
url_launcher_macos:
|
url_launcher_macos:
|
||||||
|
|
@ -162,36 +173,38 @@ EXTERNAL SOURCES:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/window_to_front/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/window_to_front/macos
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
app_links: 10e0a0ab602ffaf34d142cd4862f29d34b303b2a
|
app_links: afe860c55c7ef176cea7fb630a2b7d7736de591d
|
||||||
audio_session: dea1f41890dbf1718f04a56f1d6150fd50039b72
|
audio_session: eaca2512cf2b39212d724f35d11f46180ad3a33e
|
||||||
desktop_drop: 69eeff437544aa619c8db7f4481b3a65f7696898
|
desktop_drop: e0b672a7d84c0a6cbc378595e82cdb15f2970a43
|
||||||
device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720
|
device_info_plus: a56e6e74dbbd2bb92f2da12c64ddd4f67a749041
|
||||||
dynamic_color: 2eaa27267de1ca20d879fbd6e01259773fb1670f
|
dynamic_color: b820c000cc68df65e7ba7ff177cb98404ce56651
|
||||||
emoji_picker_flutter: 533634326b1c5de9a181ba14b9758e6dfe967a20
|
emoji_picker_flutter: b9d4f4d08bdf3168fa3827f1290d435083745a14
|
||||||
file_selector_macos: cc3858c981fe6889f364731200d6232dac1d812d
|
file_picker: 7584aae6fa07a041af2b36a2655122d42f578c1a
|
||||||
flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4
|
file_selector_macos: 6280b52b459ae6c590af5d78fc35c7267a3c4b31
|
||||||
flutter_new_badger: 5e34f40142e994b2aaff32e94062189695ee025d
|
flutter_local_notifications: 7e5a17a1dbc00d83dc10d43c2c4c05f2ceed233c
|
||||||
flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9
|
flutter_new_badger: 6fe9bf7e42793a164032c21f164c0ad9985cd0f2
|
||||||
flutter_web_auth_2: 2e1dc2d2139973e4723c5286ce247dd590390d70
|
flutter_secure_storage_macos: 7f45e30f838cf2659862a4e4e3ee1c347c2b3b54
|
||||||
flutter_webrtc: d55fd3f5c75b42940b6b4b2cf376a5797398d1f8
|
flutter_vodozemac: fd2ea9cb3e2a37beaac883a369811fbfe042fc53
|
||||||
|
flutter_web_auth_2: 62b08da29f15a20fa63f144234622a1488d45b65
|
||||||
|
flutter_webrtc: 377dbcebdde6fed0fc40de87bcaaa2bffcec9a88
|
||||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
geolocator_apple: 72a78ae3f3e4ec0db62117bd93e34523f5011d58
|
geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e
|
||||||
just_audio: 9b67ca7b97c61cfc9784ea23cd8cc55eb226d489
|
just_audio: 4e391f57b79cad2b0674030a00453ca5ce817eed
|
||||||
package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c
|
package_info_plus: f0052d280d17aa382b932f399edf32507174e870
|
||||||
pasteboard: 9b69dba6fedbb04866be632205d532fe2f6b1d99
|
pasteboard: 278d8100149f940fb795d6b3a74f0720c890ecb7
|
||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
|
||||||
record_darwin: df0a677188e5fed18472550298e675f19ddaffbe
|
record_macos: 295d70bd5fb47145df78df7b80e6697cd18403c0
|
||||||
share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf
|
share_plus: 510bf0af1a42cd602274b4629920c9649c52f4cc
|
||||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
|
||||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||||
SQLCipher: 5e6bfb47323635c8b657b1b27d25c5f1baf63bf5
|
SQLCipher: 908f846ca79d74be4e1776b3b86c6ad9e6c0b04f
|
||||||
sqlcipher_flutter_libs: db7047866b877c027b050bb808b5480c68955c5e
|
sqlcipher_flutter_libs: 72569ed27a3f8d3502571be15fdc3e28f8f8570c
|
||||||
url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404
|
url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673
|
||||||
video_compress: c896234f100791b5fef7f049afa38f6d2ef7b42f
|
video_compress: 752b161da855df2492dd1a8fa899743cc8fe9534
|
||||||
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
video_player_avfoundation: 2cef49524dd1f16c5300b9cd6efd9611ce03639b
|
||||||
wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269
|
wakelock_plus: 21ddc249ac4b8d018838dbdabd65c5976c308497
|
||||||
WebRTC-SDK: 79942c006ea64f6fb48d7da8a4786dfc820bc1db
|
WebRTC-SDK: 79942c006ea64f6fb48d7da8a4786dfc820bc1db
|
||||||
window_to_front: 4cdc24ddd8461ad1a55fa06286d6a79d8b29e8d8
|
window_to_front: 9e76fd432e36700a197dac86a0011e49c89abe0a
|
||||||
|
|
||||||
PODFILE CHECKSUM: d0975b16fbdecb73b109d8fbc88aa77ffe4c7a8d
|
PODFILE CHECKSUM: d0975b16fbdecb73b109d8fbc88aa77ffe4c7a8d
|
||||||
|
|
||||||
|
|
|
||||||
59
pubspec.lock
59
pubspec.lock
|
|
@ -142,6 +142,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.2"
|
||||||
|
build_cli_annotations:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: build_cli_annotations
|
||||||
|
sha256: b59d2769769efd6c9ff6d4c4cede0be115a566afc591705c2040b707534b1172
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
canonical_json:
|
canonical_json:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -613,14 +621,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.1.1"
|
||||||
flutter_olm:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_olm
|
|
||||||
sha256: "5e6211af8cba1abf7d1f92e543f6d573dfe6017fe4742e0d04ba84beab47f940"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.0"
|
|
||||||
flutter_openssl_crypto:
|
flutter_openssl_crypto:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -637,6 +637,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.28"
|
version: "2.0.28"
|
||||||
|
flutter_rust_bridge:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_rust_bridge
|
||||||
|
sha256: b416ff56002789e636244fb4cc449f587656eff995e5a7169457eb0593fcaddb
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.10.0"
|
||||||
flutter_secure_storage:
|
flutter_secure_storage:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -708,6 +716,14 @@ packages:
|
||||||
url: "https://github.com/famedly/flutter_typeahead.git"
|
url: "https://github.com/famedly/flutter_typeahead.git"
|
||||||
source: git
|
source: git
|
||||||
version: "5.2.0"
|
version: "5.2.0"
|
||||||
|
flutter_vodozemac:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_vodozemac
|
||||||
|
sha256: e9a6257ccdefacd2bf0128fcf41086d809f05fb34e9a4ebe0f50e7e3ff4c0970
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.0"
|
||||||
flutter_web_auth_2:
|
flutter_web_auth_2:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -1159,11 +1175,12 @@ packages:
|
||||||
matrix:
|
matrix:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: matrix
|
path: "."
|
||||||
sha256: f8f78700f967de4333a0c9ca609dac2ae05914a27faa60c5530026b7aca6ae78
|
ref: "krille/vodozemac"
|
||||||
url: "https://pub.dev"
|
resolved-ref: "81ab30dd5948408964507a04bfc53f42045ee0a3"
|
||||||
source: hosted
|
url: "https://github.com/famedly/matrix-dart-sdk.git"
|
||||||
version: "0.40.2"
|
source: git
|
||||||
|
version: "0.40.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1220,14 +1237,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "2.0.2"
|
||||||
olm:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: olm
|
|
||||||
sha256: "6a3fe1e5170b954dd9e4ba3b27513e6aa9b7591eb7bb0d7f6f32140b7f140c6f"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.1.0"
|
|
||||||
opus_caf_converter_dart:
|
opus_caf_converter_dart:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -2201,6 +2210,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "15.0.0"
|
version: "15.0.0"
|
||||||
|
vodozemac:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vodozemac
|
||||||
|
sha256: dba14017e042748fb22d270e8ab1d3e46965b89788dd3857dba938ec07571968
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.0"
|
||||||
wakelock_plus:
|
wakelock_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ dependencies:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_map: ^6.1.0
|
flutter_map: ^6.1.0
|
||||||
flutter_new_badger: ^1.1.1
|
flutter_new_badger: ^1.1.1
|
||||||
flutter_olm: 2.0.0
|
|
||||||
flutter_openssl_crypto: ^0.5.0
|
flutter_openssl_crypto: ^0.5.0
|
||||||
flutter_secure_storage: ^9.2.4
|
flutter_secure_storage: ^9.2.4
|
||||||
flutter_shortcuts_new: ^2.0.0
|
flutter_shortcuts_new: ^2.0.0
|
||||||
|
|
@ -46,6 +45,7 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/famedly/flutter_typeahead.git
|
url: https://github.com/famedly/flutter_typeahead.git
|
||||||
ref: main
|
ref: main
|
||||||
|
flutter_vodozemac: ^0.2.0
|
||||||
flutter_web_auth_2: ^3.1.1 # Version 4 blocked by https://github.com/MixinNetwork/flutter-plugins/issues/379
|
flutter_web_auth_2: ^3.1.1 # Version 4 blocked by https://github.com/MixinNetwork/flutter-plugins/issues/379
|
||||||
flutter_webrtc: ^0.12.9
|
flutter_webrtc: ^0.12.9
|
||||||
geolocator: ^13.0.1
|
geolocator: ^13.0.1
|
||||||
|
|
@ -61,7 +61,10 @@ dependencies:
|
||||||
just_audio: ^0.9.39
|
just_audio: ^0.9.39
|
||||||
latlong2: ^0.9.1
|
latlong2: ^0.9.1
|
||||||
linkify: ^5.0.0
|
linkify: ^5.0.0
|
||||||
matrix: ^0.40.2
|
matrix:
|
||||||
|
git:
|
||||||
|
url: https://github.com/famedly/matrix-dart-sdk.git
|
||||||
|
ref: krille/vodozemac
|
||||||
mime: ^1.0.6
|
mime: ^1.0.6
|
||||||
native_imaging: ^0.2.0
|
native_imaging: ^0.2.0
|
||||||
opus_caf_converter_dart: ^1.0.1
|
opus_caf_converter_dart: ^1.0.1
|
||||||
|
|
@ -151,4 +154,4 @@ dependency_overrides:
|
||||||
url: https://github.com/ThexXTURBOXx/flutter_web_auth_2.git
|
url: https://github.com/ThexXTURBOXx/flutter_web_auth_2.git
|
||||||
ref: 3.x-without-v1
|
ref: 3.x-without-v1
|
||||||
path: flutter_web_auth_2
|
path: flutter_web_auth_2
|
||||||
win32: 5.5.3
|
win32: 5.5.3
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
#!/bin/sh -ve
|
#!/bin/sh -ve
|
||||||
rm -rf assets/js/package
|
|
||||||
|
|
||||||
OLM_VERSION=$(cat pubspec.yaml | yq .dependencies.flutter_olm)
|
git clone https://github.com/famedly/dart-vodozemac.git .vodozemac
|
||||||
DOWNLOAD_PATH="https://github.com/famedly/olm/releases/download/v$OLM_VERSION/olm.zip"
|
cd .vodozemac
|
||||||
|
cargo install flutter_rust_bridge_codegen
|
||||||
cd assets/js/ && curl -L $DOWNLOAD_PATH > olm.zip && cd ../../
|
flutter_rust_bridge_codegen build-web --dart-root dart --rust-root $(readlink -f rust) --release
|
||||||
cd assets/js/ && unzip olm.zip && cd ../../
|
cd ..
|
||||||
cd assets/js/ && rm olm.zip && cd ../../
|
mv .vodozemac/dart/web/pkg ./web/
|
||||||
cd assets/js/ && mv javascript package && cd ../../
|
rm -rf .vodozemac
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
import 'package:matrix/encryption/utils/key_verification.dart';
|
import 'package:matrix/encryption/utils/key_verification.dart';
|
||||||
import 'package:matrix/matrix.dart';
|
import 'package:matrix/matrix.dart';
|
||||||
|
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
||||||
import 'package:fluffychat/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart';
|
|
||||||
|
|
||||||
Future<Client> prepareTestClient({
|
Future<Client> prepareTestClient({
|
||||||
bool loggedIn = false,
|
bool loggedIn = false,
|
||||||
|
|
@ -22,7 +21,11 @@ Future<Client> prepareTestClient({
|
||||||
importantStateEvents: <String>{
|
importantStateEvents: <String>{
|
||||||
'im.ponies.room_emotes', // we want emotes to work properly
|
'im.ponies.room_emotes', // we want emotes to work properly
|
||||||
},
|
},
|
||||||
databaseBuilder: flutterMatrixSdkDatabaseBuilder,
|
database: await MatrixSdkDatabase.init(
|
||||||
|
'test',
|
||||||
|
database: await databaseFactoryFfi.openDatabase(':memory:'),
|
||||||
|
sqfliteFactory: databaseFactoryFfi,
|
||||||
|
),
|
||||||
supportedLoginTypes: {
|
supportedLoginTypes: {
|
||||||
AuthenticationTypes.password,
|
AuthenticationTypes.password,
|
||||||
AuthenticationTypes.sso,
|
AuthenticationTypes.sso,
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
flutter_vodozemac
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue