Changed cosmic::command module to cosmic::task and changed cosmic::Task to reexport cosmic::app::Task instead of iced::Task

This commit is contained in:
Adam Cosner 2024-11-20 16:32:37 -08:00 committed by Ashley Wulber
parent 525a14cfb1
commit a64529af17
15 changed files with 34 additions and 34 deletions

View file

@ -61,7 +61,7 @@ impl cosmic::Application for App {
&mut self.core
}
/// Creates the application, and optionally emits command on initialize.
/// Creates the application, and optionally emits task on initialize.
fn init(core: Core, _flags: Self::Flags) -> (Self, Task<Self::Message>) {
let nav_model = nav_bar::Model::default();

View file

@ -89,7 +89,7 @@ impl cosmic::Application for App {
&mut self.core
}
/// Creates the application, and optionally emits command on initialize.
/// Creates the application, and optionally emits task on initialize.
fn init(core: Core, input: Self::Flags) -> (Self, Task<Self::Message>) {
let mut nav_model = nav_bar::Model::default();

View file

@ -49,7 +49,7 @@ impl cosmic::Application for App {
&mut self.core
}
/// Creates the application, and optionally emits command on initialize.
/// Creates the application, and optionally emits task on initialize.
fn init(core: Core, _input: Self::Flags) -> (Self, Task<Self::Message>) {
let now = Local::now();

View file

@ -64,7 +64,7 @@ impl cosmic::Application for App {
&mut self.core
}
/// Creates the application, and optionally emits command on initialize.
/// Creates the application, and optionally emits task on initialize.
fn init(core: Core, _input: Self::Flags) -> (Self, Task<Self::Message>) {
let mut app = App {
core,

View file

@ -50,7 +50,7 @@ impl cosmic::Application for App {
&mut self.core
}
/// Creates the application, and optionally emits command on initialize.
/// Creates the application, and optionally emits task on initialize.
fn init(core: Core, _input: Self::Flags) -> (Self, Task<Self::Message>) {
let mut app = App {
core,

View file

@ -96,7 +96,7 @@ impl cosmic::Application for App {
&mut self.core
}
/// Creates the application, and optionally emits command on initialize.
/// Creates the application, and optionally emits task on initialize.
fn init(core: Core, _input: Self::Flags) -> (Self, Task<Self::Message>) {
let app = App {
core,

View file

@ -105,7 +105,7 @@ impl cosmic::Application for App {
&mut self.core
}
/// Creates the application, and optionally emits command on initialize.
/// Creates the application, and optionally emits task on initialize.
fn init(core: Core, input: Self::Flags) -> (Self, Task<Self::Message>) {
let mut nav_model = nav_bar::Model::default();

View file

@ -65,7 +65,7 @@ impl cosmic::Application for App {
&mut self.core
}
/// Creates the application, and optionally emits command on initialize.
/// Creates the application, and optionally emits task on initialize.
fn init(core: Core, _input: Self::Flags) -> (Self, Task<Self::Message>) {
let id = core.main_window_id().unwrap();
let mut app = App {
@ -109,7 +109,7 @@ impl cosmic::Application for App {
self.set_header_title(url.to_string());
// Reads the selected file into memory.
return cosmic::command::future(async move {
return cosmic::task::future(async move {
// Check if its a valid local file path.
let path = match url.scheme() {
"file" => url.to_file_path().unwrap(),
@ -145,7 +145,7 @@ impl cosmic::Application for App {
// Creates a new open dialog.
Message::OpenFile => {
return cosmic::command::future(async move {
return cosmic::task::future(async move {
eprintln!("opening new dialog");
#[cfg(feature = "rfd")]

View file

@ -54,7 +54,7 @@ impl cosmic::Application for App {
&mut self.core
}
/// Creates the application, and optionally emits command on initialize.
/// Creates the application, and optionally emits task on initialize.
fn init(core: Core, _input: Self::Flags) -> (Self, Task<Self::Message>) {
let mut app = App {
core,