Skip to content

Commit

Permalink
Merge pull request #482 from pangeachat/481-use-forked-matrix-sdk
Browse files Browse the repository at this point in the history
integrate forked matrix sdk
  • Loading branch information
ggurdin authored Jul 23, 2024
2 parents bb8b566 + e304bb5 commit 9aad165
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
17 changes: 8 additions & 9 deletions lib/pages/chat/events/video_player.dart
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import 'dart:io';

import 'package:chewie/chewie.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pages/chat/events/image_bubble.dart';
import 'package:fluffychat/utils/localized_exception_extension.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions/event_extension.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/blur_hash.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import 'package:chewie/chewie.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:path_provider/path_provider.dart';
import 'package:universal_html/html.dart' as html;
import 'package:video_player/video_player.dart';

import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pages/chat/events/image_bubble.dart';
import 'package:fluffychat/utils/localized_exception_extension.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions/event_extension.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/blur_hash.dart';
import '../../../utils/error_reporter.dart';

class EventVideoPlayer extends StatefulWidget {
Expand Down Expand Up @@ -71,7 +70,7 @@ class EventVideoPlayerState extends State<EventVideoPlayer> {
autoInitialize: true,
);
}
} on MatrixConnectionException catch (e) {
} on Exception catch (e) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(e.toLocalizedString(context)),
Expand Down
5 changes: 1 addition & 4 deletions lib/utils/localized_exception_extension.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:io';

import 'package:flutter/material.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/encryption.dart';
import 'package:matrix/matrix.dart';
Expand Down Expand Up @@ -67,9 +66,7 @@ extension LocalizedExceptionExtension on Object {
supportedVersions,
);
}
if (this is MatrixConnectionException ||
this is SocketException ||
this is SyncConnectionException) {
if (this is SocketException || this is SyncConnectionException) {
return L10n.of(context)!.noConnectionToTheServer;
}
if (this is String) return toString();
Expand Down
6 changes: 6 additions & 0 deletions lib/utils/matrix_sdk_extensions/matrix_locals.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,4 +344,10 @@ class MatrixLocals extends MatrixLocalizations {
@override
String startedKeyVerification(String senderName) =>
l10n.startedKeyVerification(senderName);

@override
String invitedBy(String senderName) {
// TODO: implement invitedBy
throw UnimplementedError();
}
}
11 changes: 6 additions & 5 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1432,11 +1432,12 @@ packages:
matrix:
dependency: "direct main"
description:
name: matrix
sha256: bb6de59d0f69e10bb6893130a967f1ffcbfa3d3ffed3864f0736ce3d968e669c
url: "https://pub.dev"
source: hosted
version: "0.29.12"
path: "."
ref: main
resolved-ref: "0a95cd8f3cfac8c9b0b59d6ee7fdbdb159949ca3"
url: "https://github.com/pangeachat/matrix-dart-sdk.git"
source: git
version: "0.30.0"
meta:
dependency: transitive
description:
Expand Down
5 changes: 4 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ dependencies:
keyboard_shortcuts: ^0.1.4
latlong2: ^0.9.1
linkify: ^5.0.0
matrix: ^0.29.12
matrix:
git:
url: https://github.com/pangeachat/matrix-dart-sdk.git # repo
ref: main # branch
native_imaging: ^0.1.1
package_info_plus: ^6.0.0
pasteboard: ^0.2.0
Expand Down

0 comments on commit 9aad165

Please sign in to comment.