mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
fix selected auth detection, remove extra members
This commit is contained in:
parent
42d309d1de
commit
d627fd1b72
2 changed files with 24 additions and 30 deletions
|
|
@ -84,8 +84,12 @@ impl List {
|
|||
// Actions
|
||||
|
||||
/// Append new item
|
||||
pub fn append(&self, value: Value, title: &str, subtitle: &str) {
|
||||
self.model.append(&Item::new(value, title, subtitle));
|
||||
pub fn append(&self, value: Value, title: &str, subtitle: &str, is_selected: bool) {
|
||||
let item = Item::new(value, title, subtitle);
|
||||
self.model.append(&item);
|
||||
if is_selected {
|
||||
self.gobject.set_selected(self.model.find(&item).unwrap()); // @TODO panic or handle?
|
||||
}
|
||||
}
|
||||
|
||||
/// Find list item by `Value`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue