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

Tray title fix #490

Merged
merged 4 commits into from
Jun 23, 2024
Merged

Tray title fix #490

merged 4 commits into from
Jun 23, 2024

Conversation

DevilXD
Copy link
Owner

@DevilXD DevilXD commented Jun 2, 2024

@DevilXD
Copy link
Owner Author

DevilXD commented Jun 2, 2024

Looks okay, but the logic seems to be a little bit whacky. You don't need more than a single set of the formatted strings, if you precalculate the expected lengths beforehand. The trimming cases should then be something like this:

  • If it's too long, drop the self.TITLE filler first, as that never changes and can be omitted when needed.
  • If it's still too long, shorten the drop name, then game name.

A better approach would be a system that'd do some intelligent trimming, as the most important part of drop names is usually at the very end, not the start. But that can be left for another time.

This change is probably the easiest to implement out of all of them, and I'll get to it first when I finally will be able to, unless this gets merged beforehand of course.

@Windows200000
Copy link

The way it's written makes it readable and makes changes easier.

I think the title should either always or never be there for consistency.

It does trim the end of names, leaving the drop name at least 30 chars long.

@DevilXD DevilXD merged commit f987fec into DevilXD:master Jun 23, 2024
4 checks passed
@DevilXD DevilXD added the Fix This fixes an existing issue or error label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix This fixes an existing issue or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants