Skip to content

Commit

Permalink
Revert some mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Oct 23, 2024
1 parent d302c88 commit 9e7735b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
14 changes: 12 additions & 2 deletions psst-gui/src/delegate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,22 @@ impl AppDelegate<AppState> for Delegate {
id: WindowId,
data: &mut AppState,
_env: &Env,
_ctx: &mut DelegateCtx,
ctx: &mut DelegateCtx,
) {
if Some(id) == self.credits_window {
if self.credits_window == Some(id) {
self.credits_window = None;
data.credits = None;
}
if self.preferences_window == Some(id) {
self.preferences_window.take();
data.preferences.reset();
data.preferences.auth.clear();
}
if self.main_window == Some(id) {
data.config.save();
ctx.submit_command(commands::CLOSE_ALL_WINDOWS);
ctx.submit_command(commands::QUIT_APP);
}
}

fn event(
Expand Down
3 changes: 2 additions & 1 deletion psst-gui/src/ui/track.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::sync::Arc;

use druid::{
widget::{CrossAxisAlignment, Either, Flex, Label, ViewSwitcher},
LensExt, LocalizedString, Menu, MenuItem, Size, TextAlignment, Widget, WidgetExt,
Expand All @@ -7,7 +9,6 @@ use psst_core::{
item_id::{ItemId, ItemIdType},
player::item::PlaybackItem,
};
use std::sync::Arc;

use crate::{
cmd,
Expand Down

0 comments on commit 9e7735b

Please sign in to comment.