Skip to content

Commit

Permalink
Merge pull request #302 from Guocork/fix-issue-290-3
Browse files Browse the repository at this point in the history
refactor PopupAction
  • Loading branch information
Guocork authored Nov 14, 2024
2 parents 7b4b9bb + 230edf5 commit 2a2115f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl MatchEvent for App {
chat_radio_button.select(cx, &mut Scope::empty());
}

if let PopupAction::NavigateToMyModels = action.as_widget_action().cast() {
if let PopupAction::NavigateToMyModels = action.cast() {
let my_models_radio_button = self.ui.radio_button(id!(my_models_tab));
my_models_radio_button.select(cx, &mut Scope::empty());
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/download_notification_popup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ impl WidgetMatchEvent for DownloadNotificationPopup {
.clicked(actions)
{
// TODO: Abstract the navigation actions on a single enum for the whole app.
cx.widget_action(widget_uid, &scope.path, PopupAction::NavigateToMyModels);
cx.action(PopupAction::NavigateToMyModels);
cx.action(DownloadNotificationPopupAction::ActionLinkClicked);
}

Expand Down

0 comments on commit 2a2115f

Please sign in to comment.