diff options
Diffstat (limited to 'runtime/src/multi_window/state.rs')
-rw-r--r-- | runtime/src/multi_window/state.rs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/runtime/src/multi_window/state.rs b/runtime/src/multi_window/state.rs index 10366ec0..72ce6933 100644 --- a/runtime/src/multi_window/state.rs +++ b/runtime/src/multi_window/state.rs @@ -5,7 +5,7 @@ use crate::core::renderer; use crate::core::widget::operation::{self, Operation}; use crate::core::{Clipboard, Size}; use crate::user_interface::{self, UserInterface}; -use crate::{Command, Debug, Program}; +use crate::{Debug, Program, Task}; /// The execution state of a multi-window [`Program`]. It leverages caching, event /// processing, and rendering primitive storage. @@ -85,7 +85,7 @@ where /// the widgets of the linked [`Program`] if necessary. /// /// Returns a list containing the instances of [`Event`] that were not - /// captured by any widget, and the [`Command`] obtained from [`Program`] + /// captured by any widget, and the [`Task`] obtained from [`Program`] /// after updating it, only if an update was necessary. pub fn update( &mut self, @@ -96,7 +96,7 @@ where style: &renderer::Style, clipboard: &mut dyn Clipboard, debug: &mut Debug, - ) -> (Vec<Event>, Option<Command<P::Message>>) { + ) -> (Vec<Event>, Option<Task<P::Message>>) { let mut user_interfaces = build_user_interfaces( &self.program, self.caches.take().unwrap(), @@ -163,14 +163,14 @@ where drop(user_interfaces); - let commands = Command::batch(messages.into_iter().map(|msg| { + let commands = Task::batch(messages.into_iter().map(|msg| { debug.log_message(&msg); debug.update_started(); - let command = self.program.update(msg); + let task = self.program.update(msg); debug.update_finished(); - command + task })); let mut user_interfaces = build_user_interfaces( @@ -205,7 +205,7 @@ where pub fn operate( &mut self, renderer: &mut P::Renderer, - operations: impl Iterator<Item = Box<dyn Operation<P::Message>>>, + operations: impl Iterator<Item = Box<dyn Operation<()>>>, bounds: Size, debug: &mut Debug, ) { @@ -227,9 +227,7 @@ where match operation.finish() { operation::Outcome::None => {} - operation::Outcome::Some(message) => { - self.queued_messages.push(message); - } + operation::Outcome::Some(()) => {} operation::Outcome::Chain(next) => { current_operation = Some(next); } |