diff options
author | jelemux <jeremias.weber@protonmail.com> | 2021-02-03 07:08:49 +0100 |
---|---|---|
committer | jelemux <jeremias.weber@protonmail.com> | 2021-02-03 07:08:49 +0100 |
commit | 51bf8e89ce07864b70d7138bbc3958faf499cc67 (patch) | |
tree | 31e870adb0bcd539135059613e05a0f31e08e987 /src/viewmodel/telephone.rs | |
parent | 94a0e361e180223adf2bc9760c8810dfa3c2681f (diff) | |
download | wasm-card-51bf8e89ce07864b70d7138bbc3958faf499cc67.tar.gz wasm-card-51bf8e89ce07864b70d7138bbc3958faf499cc67.tar.bz2 |
now it compiles
Diffstat (limited to 'src/viewmodel/telephone.rs')
-rw-r--r-- | src/viewmodel/telephone.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/viewmodel/telephone.rs b/src/viewmodel/telephone.rs index e5f63f0..6c930a2 100644 --- a/src/viewmodel/telephone.rs +++ b/src/viewmodel/telephone.rs @@ -1,11 +1,9 @@ -use std::collections::HashSet; use super::*; use crate::view::telephone::*; -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct Telephone { pub number: String, - pub extension: String, pub work: bool, pub home: bool, pub text: bool, @@ -21,7 +19,6 @@ impl VCardPropertyInputObject<TelephoneView> for Telephone { fn new() -> Self { Self { number: String::new(), - extension: String::new(), work: false, home: false, text: false, @@ -42,13 +39,6 @@ impl VCardPropertyInputObject<TelephoneView> for Telephone { oninput: link.callback(|e: InputData| Msg::UpdateNumber(e.value)), value: self.number.clone(), }, - VCardPropertyInputField::Text{ - label: "Extension".to_string(), - id: Some("extension".to_string()), - placeholder: None, - oninput: link.callback(|e: InputData| Msg::UpdateExtension(e.value)), - value: self.extension.clone(), - }, VCardPropertyInputField::CheckBox{ label: "Work".to_string(), id: Some("work".to_string()), @@ -106,7 +96,6 @@ impl VCardPropertyInputObject<TelephoneView> for Telephone { ] } fn is_empty(&self) -> bool { - self.number.is_empty() && - self.extension.is_empty() + self.number.is_empty() } }
\ No newline at end of file |