fix(power): when restarting from the shutdown confirmation, skip the dialog
This commit is contained in:
parent
afff0793aa
commit
6ede0fbe05
1 changed files with 4 additions and 1 deletions
|
|
@ -172,7 +172,10 @@ impl cosmic::Application for Power {
|
|||
}
|
||||
Message::Action(action) => {
|
||||
// Ask for user confirmation of non-destructive actions only
|
||||
if matches!(action, PowerAction::Lock | PowerAction::Suspend) {
|
||||
if matches!(action, PowerAction::Lock | PowerAction::Suspend)
|
||||
|| matches!(action, PowerAction::Restart)
|
||||
&& matches!(self.action_to_confirm, Some((_, PowerAction::Shutdown, _)))
|
||||
{
|
||||
action.perform()
|
||||
} else {
|
||||
let id = window::Id::unique();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue