This commit is contained in:
veeso
2021-03-26 22:19:24 +01:00
parent de3983e53f
commit 423f84353d
8 changed files with 34 additions and 45 deletions

View File

@@ -83,11 +83,8 @@ impl AuthActivity {
.view
.get_value(super::COMPONENT_RADIO_BOOKMARK_SAVE_PWD)
{
Some(Payload::Unsigned(choice)) => match choice {
0 => Some(password), // Yes
_ => None, // No
},
_ => None, // No such component
Some(Payload::Unsigned(0)) => Some(password), // Yes
_ => None, // No such component / No
},
false => None,
};

View File

@@ -274,14 +274,10 @@ impl AuthActivity {
Some(Payload::Text(s)) => s,
_ => String::new(),
};
let save_pwd: bool =
match self.view.get_value(COMPONENT_RADIO_BOOKMARK_SAVE_PWD) {
Some(Payload::Unsigned(idx)) => match idx {
0 => true,
_ => false,
},
_ => false,
};
let save_pwd: bool = matches!(
self.view.get_value(COMPONENT_RADIO_BOOKMARK_SAVE_PWD),
Some(Payload::Unsigned(0))
);
// Save bookmark
self.save_bookmark(bookmark_name, save_pwd);
// Umount popup