diff options
Diffstat (limited to 'src/view/main.rs')
-rw-r--r-- | src/view/main.rs | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/view/main.rs b/src/view/main.rs index b1c0dda..9b6a345 100644 --- a/src/view/main.rs +++ b/src/view/main.rs @@ -1,5 +1,4 @@ use yew::services::ConsoleService; -use yewtil::ptr::Irc; use crate::viewmodel::vcard::VCardData; use crate::viewmodel::Error; use crate::view::telephone::{self,TelephoneView}; @@ -44,9 +43,9 @@ pub enum Msg { ChangeDownloadOption(DownloadOption), Generate, - GeneratedName(Irc<Name>), - GeneratedAddress(Irc<Address>), - GeneratedTelephone(Irc<Telephone>), + GeneratedName(Name), + GeneratedAddress(Address), + GeneratedTelephone(Telephone), GenerationComplete, Nope, @@ -167,13 +166,7 @@ impl Component for MainView { self.answer_count = 0; - let vcard_data = match self.vcard_data.irc().try_unwrap() { - Ok(data) => data, - Err(err) => { - ConsoleService::error(&format!("Error when unwrapping VCardData: {:?}", err)); - VCardData::new() - }, - }; + let vcard_data = self.vcard_data.clone_inner(); let mut builder = VcardBuilder::new(); @@ -382,7 +375,7 @@ impl Component for MainView { html!{ <NameView weak_link=link generated=self.link.callback( - |n: Irc<Name>| + |n: Name| Msg::GeneratedName(n) ) /> @@ -395,7 +388,7 @@ impl Component for MainView { html!{ <AddressView weak_link=link generated=self.link.callback( - |a: Irc<Address>| + |a: Address| Msg::GeneratedAddress(a) ) /> @@ -408,7 +401,7 @@ impl Component for MainView { html!{ <TelephoneView weak_link=link generated=self.link.callback( - |t: Irc<Telephone>| + |t: Telephone| Msg::GeneratedTelephone(t) ) /> |