mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 01:00:02 +00:00
update dialog widget on identity disconnect action
This commit is contained in:
parent
a361c5aa97
commit
2b0f18286f
@ -53,7 +53,7 @@ impl Form {
|
||||
let save = Rc::new(Save::new(profile.clone(), list.clone()));
|
||||
let drop = Rc::new(Drop::new(profile.clone(), list.clone()));
|
||||
let exit = Rc::new(Exit::new(
|
||||
action.0.clone(),
|
||||
(action.0.clone(), action.2.clone()),
|
||||
profile.clone(),
|
||||
list.clone(),
|
||||
auth_uri.clone(),
|
||||
|
@ -1,6 +1,8 @@
|
||||
use super::list::{item::Value, List};
|
||||
use crate::app::browser::action::Action as BrowserAction;
|
||||
use crate::profile::Profile;
|
||||
use super::{
|
||||
list::{item::Value, List},
|
||||
WidgetAction,
|
||||
};
|
||||
use crate::{app::browser::Action as BrowserAction, Profile};
|
||||
use adw::{
|
||||
prelude::{AdwDialogExt, AlertDialogExt, AlertDialogExtManual},
|
||||
AlertDialog, ResponseAppearance,
|
||||
@ -32,7 +34,7 @@ impl Exit {
|
||||
|
||||
/// Create new `Self`
|
||||
pub fn new(
|
||||
browser_action: Rc<BrowserAction>,
|
||||
action: (Rc<BrowserAction>, Rc<WidgetAction>),
|
||||
profile: Rc<Profile>,
|
||||
list: Rc<List>,
|
||||
auth_uri: Uri,
|
||||
@ -78,10 +80,11 @@ impl Exit {
|
||||
// Connect confirmation event
|
||||
alert_dialog.connect_response(Some(RESPONSE_CONFIRM.0), {
|
||||
let auth_uri = auth_uri.clone();
|
||||
let browser_action = browser_action.clone();
|
||||
let button = button.clone();
|
||||
let list = list.clone();
|
||||
let profile = profile.clone();
|
||||
let browser_action = action.0.clone();
|
||||
let widget_action = action.1.clone();
|
||||
move |_, _| {
|
||||
match profile
|
||||
.identity
|
||||
@ -107,7 +110,8 @@ impl Exit {
|
||||
button.set_label(&e.to_string())
|
||||
}
|
||||
}
|
||||
browser_action.update.activate(None)
|
||||
browser_action.update.activate(None);
|
||||
widget_action.update.activate();
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user