Dragon-0609 / Yuki-Theme

Yuki Theme is an app to change UI colors of PascalABC.NET.

Home Page:https://Dragon-0609.github.io/Yuki-Theme/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Loading external theme without waiting for finishing loading

Dragon-0609 opened this issue · comments

Describe the bug
The onSelect method of MForm runs before Theme loading process finishes. Theme loads in populateList method. After, it chooses is theme old format or new. In loadThemeToPopulate method of OldThemeFormat it should wait for loading, but it doesn't. I thought it didn't because strange error appeared in Helper.GetTheme because it couldn't identify is it zip or not. So, I added ZipVerificator and Helper.IsZIP message. But Helper.IsZIP wasn't shown. It means, MForm somehow goes around Loading Process.

To Reproduce
Steps to reproduce the behavior:

  1. Compile dev_9 breanch and Run Yuki_Theme.exe
  2. Select Custom theme (you can try to download theme from theme downloader)
  3. See strange error
bandicam.2022-05-19.20-52-06-602.mp4

Expected behavior
To work without strange errors.

Desktop (please complete the following information):

  • OS Version: Windows 10

Additional context
In Token Verification process custom themes are loaded successful. So, problem is in MForm tasks.

Here's fix. The problem was just in this line:

screenshot