Skip to content

Conversation

@VictoriousRaptor
Copy link
Contributor

@VictoriousRaptor VictoriousRaptor commented Jan 11, 2023

Always show/search description in program results if description is enabled in settings. If name and desc are equal the desc is omitted.

This pr is done because an uwp app named "Xbox" but with a description "XboxPcApp". Currently in this case the result title is "XboxPcApp" when description is enabled. In this pr the title will be "Xbox: XboxPcApp".

P.S: The diff view is messy somehow. git blame is fine. Most of the changes are deletion.

Change:

  • Always show description if enabled, unless name and description are equal.

Test:

  • programs can be searched via name and description

@VictoriousRaptor VictoriousRaptor self-assigned this Jan 11, 2023
@VictoriousRaptor VictoriousRaptor added the bug Something isn't working label Jan 11, 2023
@jjw24
Copy link
Member

jjw24 commented Jan 16, 2023

I seem to be able to search description already with dev branch build:

image

@VictoriousRaptor
Copy link
Contributor Author

VictoriousRaptor commented Jan 16, 2023

I seem to be able to search description already with dev branch build:

That's in release. Currently if description starts with app name, like the example I mentioned, we only fuzzy search the description and show the description as result title. That's enough for searching but the result title might be confusing.

if (string.IsNullOrEmpty(Description) || resultName.StartsWith(Description))
{
// Description is invalid or included in resultName
// Description is always localized, so Name.StartsWith(Description) is generally useless
title = resultName;
matchResult = StringMatcher.FuzzySearch(query, resultName);
}
else if (Description.StartsWith(resultName))
{
// resultName included in Description
title = Description;
matchResult = StringMatcher.FuzzySearch(query, Description);
}

@jjw24
Copy link
Member

jjw24 commented Jan 16, 2023

ok I see 👍

@jjw24 jjw24 enabled auto-merge January 16, 2023 10:19
@jjw24 jjw24 added this to the 1.11.1 milestone Jan 16, 2023
@jjw24 jjw24 merged commit c5cc4ed into Flow-Launcher:dev Jan 16, 2023
@VictoriousRaptor VictoriousRaptor deleted the ShowProgramDesc branch January 16, 2023 11:02
@jjw24 jjw24 modified the milestones: 1.11.1, 1.12.0 Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants