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:
parent
525a14cfb1
commit
a64529af17
15 changed files with 34 additions and 34 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue