Move all operations to widget::operation module

This commit is contained in:
Héctor Ramón Jiménez 2025-08-23 03:54:54 +02:00
parent 885d45f435
commit 34a42b5ad4
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
14 changed files with 124 additions and 136 deletions

View file

@ -2,7 +2,7 @@ mod echo;
use iced::futures::stream;
use iced::widget::{
self, button, center, column, row, scrollable, text, text_input,
button, center, column, operation, row, scrollable, text, text_input,
};
use iced::{Center, Element, Fill, Subscription, Task, color};
@ -34,7 +34,7 @@ impl WebSocket {
new_message: String::new(),
state: State::Disconnected,
},
widget::focus_next(),
operation::focus_next(),
)
}
@ -73,10 +73,7 @@ impl WebSocket {
echo::Event::MessageReceived(message) => {
self.messages.push(message);
scrollable::snap_to(
MESSAGE_LOG,
scrollable::RelativeOffset::END,
)
operation::snap_to_end(MESSAGE_LOG)
}
},
Message::Server => Task::none(),