mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-04 16:01:07 +10:00
change to prepare Outbound Text Functions.
This commit is contained in:
@@ -10,7 +10,6 @@ import 'package:provider/provider.dart';
|
|||||||
import '../connector/meshcore_connector.dart';
|
import '../connector/meshcore_connector.dart';
|
||||||
import '../utils/platform_info.dart';
|
import '../utils/platform_info.dart';
|
||||||
import '../helpers/chat_scroll_controller.dart';
|
import '../helpers/chat_scroll_controller.dart';
|
||||||
import '../helpers/smaz.dart';
|
|
||||||
import '../connector/meshcore_protocol.dart';
|
import '../connector/meshcore_protocol.dart';
|
||||||
import '../helpers/gif_helper.dart';
|
import '../helpers/gif_helper.dart';
|
||||||
import '../helpers/reaction_helper.dart';
|
import '../helpers/reaction_helper.dart';
|
||||||
@@ -1102,7 +1101,10 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|||||||
onSubmitted: (_) => _sendMessage(),
|
onSubmitted: (_) => _sendMessage(),
|
||||||
encoder:
|
encoder:
|
||||||
connector.isChannelSmazEnabled(widget.channel.index)
|
connector.isChannelSmazEnabled(widget.channel.index)
|
||||||
? Smaz.encodeIfSmaller
|
? (text) => connector.prepareChannelOutboundText(
|
||||||
|
widget.channel.index,
|
||||||
|
text,
|
||||||
|
)
|
||||||
: null,
|
: null,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: context.l10n.chat_typeMessage,
|
hintText: context.l10n.chat_typeMessage,
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import 'package:latlong2/latlong.dart';
|
|||||||
import '../connector/meshcore_connector.dart';
|
import '../connector/meshcore_connector.dart';
|
||||||
import '../connector/meshcore_protocol.dart';
|
import '../connector/meshcore_protocol.dart';
|
||||||
import '../helpers/reaction_helper.dart';
|
import '../helpers/reaction_helper.dart';
|
||||||
import '../helpers/smaz.dart';
|
|
||||||
import '../widgets/message_status_icon.dart';
|
import '../widgets/message_status_icon.dart';
|
||||||
import '../helpers/chat_scroll_controller.dart';
|
import '../helpers/chat_scroll_controller.dart';
|
||||||
import '../helpers/gif_helper.dart';
|
import '../helpers/gif_helper.dart';
|
||||||
@@ -578,7 +577,10 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||||||
connector.isContactSmazEnabled(
|
connector.isContactSmazEnabled(
|
||||||
widget.contact.publicKeyHex,
|
widget.contact.publicKeyHex,
|
||||||
)
|
)
|
||||||
? Smaz.encodeIfSmaller
|
? (text) => connector.prepareContactOutboundText(
|
||||||
|
widget.contact,
|
||||||
|
text,
|
||||||
|
)
|
||||||
: null,
|
: null,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: context.l10n.chat_typeMessage,
|
hintText: context.l10n.chat_typeMessage,
|
||||||
|
|||||||
Reference in New Issue
Block a user