-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add left menu badges #1452
Add left menu badges #1452
Conversation
|
||
public static bool FilterDownloadAnalysisModel(DownloadAnalysis.Model model, GameDomain currentGameDomain) | ||
{ | ||
if (!model.TryGet(DownloaderState.GameDomain, out var domain)) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not return false
If we don't have a GameDomain on the DownloadState it is likely because it was installed from archive on disk, but we want to show those, not filter them out.
You can move the StreamBasedFileOrigin check first, then return true if has no game, then false if game doesn't match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do archives from disk not have a game domain? The button to do so is in the Loadout Grid, so we have access to the game domain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with that is that you are assuming that the user will add a mod for this game, which isn't necessarily true.
So someone on SSE could add a mod for Legendary edition and we would auto label it as SSE mod. Leaving it unknown is preferrable in that case.
I guess we will have to figure something out when we add support for another game.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the code to add GameDomain
to the manually added archive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support SSE or LE yet. For Stardew Valley, modders would expect their Stardew Valley archives to appear for Stardew Valley and not as "unknown".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file would show up even if installation failed because it wasn't actually a StardewMod. We might want to ask @captainsandypants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mod installation isn't relevant to this, tho. Adding a mod manually is an escape hatch in the first place. Again, this shouldn't be complex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that if the user adds a mod manually to Stardew we should register is as Stardew, although where would the game domain show up in the UI? And do we need to consider multiple game store version of Stardew being managed for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although where would the game domain show up in the UI?
We don't have a column that shows the game domain, but the code above filters by game domain because that's the only way to check if the download is for the current game.
And do we need to consider multiple game store version of Stardew being managed for this?
No. The "game domain" is the identifier used by Nexus Mods stardewvalley
and applies to all versions of the game. It's our way of uniquely identifying a game across installations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds fine for now then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test fail locally as well: https://github.com/Nexus-Mods/NexusMods.App/actions/runs/9256864195?pr=1452
Resolves #1424.
Also adds badges for diagnostics instead of using
(count)
as before. Since the left menu doesn't know if the mod library page is currently open and visible, the badge will only be removed if the user actually clicks on the item.