feat: Move recordSentMessage to pigeon

This commit is contained in:
2023-08-03 21:27:13 +02:00
parent 61de3cd565
commit b12e36da83
8 changed files with 102 additions and 30 deletions

View File

@@ -1,8 +1,8 @@
import 'package:flutter/services.dart';
import 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart';
import 'package:moxplatform_platform_interface/src/api.g.dart';
class AndroidContactsImplementation extends ContactsImplementation {
final _methodChannel = const MethodChannel('me.polynom.moxplatform_android');
final MoxplatformApi _api = MoxplatformApi();
@override
Future<void> recordSentMessage(
@@ -19,14 +19,11 @@ class AndroidContactsImplementation extends ContactsImplementation {
);
}
await _methodChannel.invokeMethod<void>(
'recordSentMessage',
[
name,
jid,
avatarPath,
fallbackIcon.id,
],
return _api.recordSentMessage(
name,
jid,
avatarPath,
fallbackIcon,
);
}
}