Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard rail for clicking refresh with refresh already in progress #4303

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Feb 7, 2025

Problem

CKAN's tray icon has a notification that pops up after a refresh when there are updatable mods. Clicking this begins installation of those updates.

If you do this while an update or install is already in progress, an exception is thrown:

System.InvalidOperationException: This BackgroundWorker is currently busy and cannot run multiple tasks concurrently.
   at System.ComponentModel.BackgroundWorker.RunWorkerAsync(Object argument)
   at CKAN.GUI.Main.minimizeNotifyIcon_BalloonTipClicked(Object sender, EventArgs e)
   at System.Windows.Forms.NotifyIcon.OnBalloonTipClicked()
   at System.Windows.Forms.NotifyIcon.WndProc(Message& msg)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Cause

Similar to #4302, when the progress screen is already busy doing something, it can't be interrupted to do a refresh instead / in addition.

Changes

  • Now if the progress screen is already busy, attempting to start another refresh will do nothing, so the exception won't be thrown.
  • The English text of the notification is slightly re-worded to hopefully make it easier to understand.
    image

Fixes #4295.

@HebaruSan HebaruSan added Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI labels Feb 7, 2025
@HebaruSan HebaruSan merged commit 793869e into KSP-CKAN:master Feb 7, 2025
2 checks passed
@HebaruSan HebaruSan deleted the fix/trayicon-worker-busy branch February 7, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI
Projects
None yet
1 participant