From 8ef8a3849553ede3c8d3471d93ce84fee47e6e61 Mon Sep 17 00:00:00 2001 From: ericz Date: Sat, 18 Apr 2026 00:06:03 +0200 Subject: [PATCH] change to prepare Outbound Text Functions. --- lib/screens/channel_chat_screen.dart | 6 ++++-- lib/screens/chat_screen.dart | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/screens/channel_chat_screen.dart b/lib/screens/channel_chat_screen.dart index dfcdcdb..b203cbb 100644 --- a/lib/screens/channel_chat_screen.dart +++ b/lib/screens/channel_chat_screen.dart @@ -10,7 +10,6 @@ import 'package:provider/provider.dart'; import '../connector/meshcore_connector.dart'; import '../utils/platform_info.dart'; import '../helpers/chat_scroll_controller.dart'; -import '../helpers/smaz.dart'; import '../connector/meshcore_protocol.dart'; import '../helpers/gif_helper.dart'; import '../helpers/reaction_helper.dart'; @@ -1102,7 +1101,10 @@ class _ChannelChatScreenState extends State { onSubmitted: (_) => _sendMessage(), encoder: connector.isChannelSmazEnabled(widget.channel.index) - ? Smaz.encodeIfSmaller + ? (text) => connector.prepareChannelOutboundText( + widget.channel.index, + text, + ) : null, decoration: InputDecoration( hintText: context.l10n.chat_typeMessage, diff --git a/lib/screens/chat_screen.dart b/lib/screens/chat_screen.dart index 435e6c5..ffa8344 100644 --- a/lib/screens/chat_screen.dart +++ b/lib/screens/chat_screen.dart @@ -14,7 +14,6 @@ import 'package:latlong2/latlong.dart'; import '../connector/meshcore_connector.dart'; import '../connector/meshcore_protocol.dart'; import '../helpers/reaction_helper.dart'; -import '../helpers/smaz.dart'; import '../widgets/message_status_icon.dart'; import '../helpers/chat_scroll_controller.dart'; import '../helpers/gif_helper.dart'; @@ -578,7 +577,10 @@ class _ChatScreenState extends State { connector.isContactSmazEnabled( widget.contact.publicKeyHex, ) - ? Smaz.encodeIfSmaller + ? (text) => connector.prepareContactOutboundText( + widget.contact, + text, + ) : null, decoration: InputDecoration( hintText: context.l10n.chat_typeMessage,