-
-
Notifications
You must be signed in to change notification settings - Fork 102
Theme Downloader Redo #750
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
base: master
Are you sure you want to change the base?
Conversation
There's now Violet, Teal, and Monochrome to go along with the colours added previously, but I also got more creative and made some totally new designs There's now 2 metallic themes, Metallic_Silver and Metallic_Default I also added a recreation of Windows XP's Luna theme as a bonus
Added a "Fetch Themes..." option to the theme selector, which if selected will fetch all GUIs mods from GameBanana and add them to the list. clicking on any of the new entries will automatically download and install it The catch? I haven't tested it in a real scenario yet because GetByNameAsync does not return Also I removed the luna theme, I really liked that one but Microsoft might have something to say about it so it's gone now
I manually recreated the results the API call should be returning, so I was able to test it for real, and I immediately noticed a few flaws - Fixed installing the heroes mod loader theme - Fixed duplicates being added to the theme selector - Fixed bullet lists not being recognized - Added an admittedly hacky method to update the download window as it goes along - Attempted to make it switch to the theme you selected after it installs, but it's not working, I'll have to work on that a bit more As it is right now, you have to either restart reloaded after installing the theme, or switch to a different theme and switch back to get it to properly update I also removed all of my other themes I added previously, that was the plan anyways and I wanted to test downloading them
Finished all the polishing to tie everything together - Moved ThemeDownloader.cs from Launcher/Lib/Utility to Launcher/Utility, so I can do the window stuff from there - Created a new download window for themes which *should* update along with the download, it doesn't for some reason but it should - The theme doesn't switch back to default anymore when 'Fetch Themes...' is selected - The new themes are inserted into the drop down alphabetically to keep the sorting - Implemented the most bodgeyest of bodges to get it to switch to the theme after downloading
I added a retry policy to both downloading themes, and fetching them Also cleaned up a couple things while I was doing that - Removed the unnecessary binding to ThemeDownloadDialog's progress bar value - Removed the documentation for a parameter on DownloadThemeByName that isn't there anymore
- Added a cancel button and associated logic when downloading themes - Made the text colour be the opposite of the progress bar below it - Added a try catch around extracting a theme, just in case - Moved the dialog handling to a task, which I was hoping would allow the progress bar to update but sadly still no - The download dialog is only created once and then reused, so it doesn't pop up twice when downloading the heroes mod loader theme
private void PopulateAndFetch(string selectedTheme, bool fetch=true)
{
PopulateXamlFiles();
ThemeDownloader.RefreshAvailableThemes(fetch).Wait();This is the cause of the deadlock. Needs to be |
|
Use the default top level category 'Mod' in here.
In the older days, GameBanana had multiple top level categories; Skin, Mod, GameFile, etc. |
|
Needs rebase; Has extra commits |
|
Eh, it's fine, I don't mind. |
A standard for uploading themes has been decided, and some fixes on top of that - Changed theme fetching to match the standard (with some exceptions for existing themes) - Implemented the deadlock fix that Sewer suggested - Themes now fetch from the default category, and have a take of 50 Once the other themes have been changed to match the standard, I'll be back to remove the exceptions
I've finished the theme downloader, but unfortunately there's still one final issue you'll have to take a look at, the API call to fetch the mods still doesn't return
The call is in ThemeDownloader.cs located in Launcher/Utility, line 100
I've added a definition at the top of ThemeDownloader to enable test mode, which recreates the API call's results so the downloader can at least be tested out.
themedownloader.mp4