Merge branch 'main' into favorite_filter_ez

This commit is contained in:
zjs81
2026-02-24 19:51:02 -07:00
5 changed files with 79 additions and 1185 deletions
+1
View File
@@ -30,6 +30,7 @@ migrate_working_dir/
.flutter-plugins-dependencies .flutter-plugins-dependencies
.pub-cache/ .pub-cache/
.pub/ .pub/
pubspec.lock
/build/ /build/
/coverage/ /coverage/
+23 -5
View File
@@ -970,7 +970,19 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
builder: (context, value, child) { builder: (context, value, child) {
final gifId = _parseGifId(value.text); final gifId = _parseGifId(value.text);
if (gifId != null) { if (gifId != null) {
return Row( return Focus(
autofocus: true,
onKeyEvent: (node, event) {
if (event is KeyDownEvent &&
(event.logicalKey == LogicalKeyboardKey.enter ||
event.logicalKey ==
LogicalKeyboardKey.numpadEnter)) {
_sendMessage();
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
},
child: Row(
children: [ children: [
Expanded( Expanded(
child: ClipRRect( child: ClipRRect(
@@ -981,9 +993,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,
), ),
), ),
@@ -991,9 +1004,13 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
const SizedBox(width: 8), const SizedBox(width: 8),
IconButton( IconButton(
icon: const Icon(Icons.close), icon: const Icon(Icons.close),
onPressed: () => _textController.clear(), onPressed: () {
_textController.clear();
_textFieldFocusNode.requestFocus();
},
), ),
], ],
),
); );
} }
@@ -1056,6 +1073,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
connector.sendChannelMessage(widget.channel, messageText); connector.sendChannelMessage(widget.channel, messageText);
_textController.clear(); _textController.clear();
_cancelReply(); _cancelReply();
_textFieldFocusNode.requestFocus();
} }
String _formatTime(DateTime time) { String _formatTime(DateTime time) {
+19 -2
View File
@@ -354,7 +354,19 @@ class _ChatScreenState extends State<ChatScreen> {
builder: (context, value, child) { builder: (context, value, child) {
final gifId = _parseGifId(value.text); final gifId = _parseGifId(value.text);
if (gifId != null) { if (gifId != null) {
return Row( return Focus(
autofocus: true,
onKeyEvent: (node, event) {
if (event is KeyDownEvent &&
(event.logicalKey == LogicalKeyboardKey.enter ||
event.logicalKey ==
LogicalKeyboardKey.numpadEnter)) {
_sendMessage(connector);
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
},
child: Row(
children: [ children: [
Expanded( Expanded(
child: ClipRRect( child: ClipRRect(
@@ -373,9 +385,13 @@ class _ChatScreenState extends State<ChatScreen> {
const SizedBox(width: 8), const SizedBox(width: 8),
IconButton( IconButton(
icon: const Icon(Icons.close), icon: const Icon(Icons.close),
onPressed: () => _textController.clear(), onPressed: () {
_textController.clear();
_textFieldFocusNode.requestFocus();
},
), ),
], ],
),
); );
} }
@@ -443,6 +459,7 @@ class _ChatScreenState extends State<ChatScreen> {
connector.sendMessage(widget.contact, text); connector.sendMessage(widget.contact, text);
_textController.clear(); _textController.clear();
_textFieldFocusNode.requestFocus();
} }
void _showPathHistory(BuildContext context) { void _showPathHistory(BuildContext context) {
+1
View File
@@ -168,6 +168,7 @@ class _RepeaterCliScreenState extends State<RepeaterCliScreen> {
_commandController.clear(); _commandController.clear();
_historyIndex = -1; _historyIndex = -1;
_commandFocusNode.requestFocus();
// Auto-scroll to bottom // Auto-scroll to bottom
Future.delayed(const Duration(milliseconds: 100), () { Future.delayed(const Duration(milliseconds: 100), () {
-1143
View File
File diff suppressed because it is too large Load Diff