|
|
|
@ -367,17 +367,24 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Icon(
|
|
|
|
child: Icon(
|
|
|
|
(message.status == ChannelMessageStatus.sent && displayPath.isNotEmpty)
|
|
|
|
(message.status ==
|
|
|
|
|
|
|
|
ChannelMessageStatus.sent &&
|
|
|
|
|
|
|
|
displayPath.isNotEmpty)
|
|
|
|
? Icons.check_circle
|
|
|
|
? Icons.check_circle
|
|
|
|
: message.status == ChannelMessageStatus.failed
|
|
|
|
: message.status ==
|
|
|
|
? Icons.cancel
|
|
|
|
ChannelMessageStatus.failed
|
|
|
|
: Icons.cloud,
|
|
|
|
? Icons.cancel
|
|
|
|
|
|
|
|
: Icons.cloud,
|
|
|
|
size: 14,
|
|
|
|
size: 14,
|
|
|
|
color: (message.status == ChannelMessageStatus.sent && displayPath.isNotEmpty)
|
|
|
|
color:
|
|
|
|
|
|
|
|
(message.status ==
|
|
|
|
|
|
|
|
ChannelMessageStatus.sent &&
|
|
|
|
|
|
|
|
displayPath.isNotEmpty)
|
|
|
|
? Colors.green
|
|
|
|
? Colors.green
|
|
|
|
: message.status == ChannelMessageStatus.failed
|
|
|
|
: message.status ==
|
|
|
|
? Colors.red
|
|
|
|
ChannelMessageStatus.failed
|
|
|
|
: Colors.white70,
|
|
|
|
? Colors.red
|
|
|
|
|
|
|
|
: Colors.white70,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -402,8 +409,10 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|
|
|
defaultToHttps: false,
|
|
|
|
defaultToHttps: false,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
linkifiers: const [UrlLinkifier()],
|
|
|
|
linkifiers: const [UrlLinkifier()],
|
|
|
|
onOpen: (link) =>
|
|
|
|
onOpen: (link) => LinkHandler.handleLinkTap(
|
|
|
|
LinkHandler.handleLinkTap(context, link.url),
|
|
|
|
context,
|
|
|
|
|
|
|
|
link.url,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (!enableTracing && isOutgoing) ...[
|
|
|
|
if (!enableTracing && isOutgoing) ...[
|
|
|
|
@ -411,17 +420,24 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(bottom: 2),
|
|
|
|
padding: const EdgeInsets.only(bottom: 2),
|
|
|
|
child: Icon(
|
|
|
|
child: Icon(
|
|
|
|
(message.status == ChannelMessageStatus.sent && displayPath.isNotEmpty)
|
|
|
|
(message.status ==
|
|
|
|
|
|
|
|
ChannelMessageStatus.sent &&
|
|
|
|
|
|
|
|
displayPath.isNotEmpty)
|
|
|
|
? Icons.check_circle
|
|
|
|
? Icons.check_circle
|
|
|
|
: message.status == ChannelMessageStatus.failed
|
|
|
|
: message.status ==
|
|
|
|
? Icons.cancel
|
|
|
|
ChannelMessageStatus.failed
|
|
|
|
: Icons.cloud,
|
|
|
|
? Icons.cancel
|
|
|
|
|
|
|
|
: Icons.cloud,
|
|
|
|
size: 14,
|
|
|
|
size: 14,
|
|
|
|
color: (message.status == ChannelMessageStatus.sent && displayPath.isNotEmpty)
|
|
|
|
color:
|
|
|
|
|
|
|
|
(message.status ==
|
|
|
|
|
|
|
|
ChannelMessageStatus.sent &&
|
|
|
|
|
|
|
|
displayPath.isNotEmpty)
|
|
|
|
? Colors.green
|
|
|
|
? Colors.green
|
|
|
|
: message.status == ChannelMessageStatus.failed
|
|
|
|
: message.status ==
|
|
|
|
? Colors.red
|
|
|
|
ChannelMessageStatus.failed
|
|
|
|
: Colors.grey,
|
|
|
|
? Colors.red
|
|
|
|
|
|
|
|
: Colors.grey,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -915,7 +931,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|
|
|
onKeyEvent: (node, event) {
|
|
|
|
onKeyEvent: (node, event) {
|
|
|
|
if (event is KeyDownEvent &&
|
|
|
|
if (event is KeyDownEvent &&
|
|
|
|
(event.logicalKey == LogicalKeyboardKey.enter ||
|
|
|
|
(event.logicalKey == LogicalKeyboardKey.enter ||
|
|
|
|
event.logicalKey == LogicalKeyboardKey.numpadEnter)) {
|
|
|
|
event.logicalKey ==
|
|
|
|
|
|
|
|
LogicalKeyboardKey.numpadEnter)) {
|
|
|
|
_sendMessage();
|
|
|
|
_sendMessage();
|
|
|
|
return KeyEventResult.handled;
|
|
|
|
return KeyEventResult.handled;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -932,9 +949,10 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|
|
|
backgroundColor: Theme.of(
|
|
|
|
backgroundColor: Theme.of(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
).colorScheme.surfaceContainerHighest,
|
|
|
|
).colorScheme.surfaceContainerHighest,
|
|
|
|
fallbackTextColor: Theme.of(
|
|
|
|
fallbackTextColor: Theme.of(context)
|
|
|
|
context,
|
|
|
|
.colorScheme
|
|
|
|
).colorScheme.onSurface.withValues(alpha: 0.6),
|
|
|
|
.onSurface
|
|
|
|
|
|
|
|
.withValues(alpha: 0.6),
|
|
|
|
maxSize: 160,
|
|
|
|
maxSize: 160,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|