Skip to content

Result#Equals() does not check AutoCompleteText or CopyText #2201

@JamesNZL

Description

@JamesNZL

Point to the corresponding file and line number(s) which could be improved.

Result.cs, lines 162165

https://github.com/Flow-Launcher/Flow.Launcher/blob/e1c63af06184d3993128da09373307566265e425/Flow.Launcher.Plugin/Result.cs#L162C13-L162C13

Provide your alternative implementation idea:

public override bool Equals(object obj)
{
	var r = obj as Result;

	var equality = string.Equals(r?.Title, Title) &&
                 string.Equals(r?.SubTitle, SubTitle) &&
                 string.Equals(r?.AutoCompleteText, AutoCompleteText) &&
                 string.Equals(r?.CopyText, CopyText) &&
                 string.Equals(r?.IcoPath, IcoPath) &&
                 TitleHighlightData == r.TitleHighlightData;

	return equality;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions