Ignore diacritics on game search (#6602)
This commit is contained in:
parent
8c2da1aa04
commit
05c041feeb
1 changed files with 9 additions and 1 deletions
|
@ -36,6 +36,7 @@ using SixLabors.ImageSharp.PixelFormats;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -980,7 +981,14 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
{
|
{
|
||||||
if (arg is ApplicationData app)
|
if (arg is ApplicationData app)
|
||||||
{
|
{
|
||||||
return string.IsNullOrWhiteSpace(_searchText) || app.TitleName.ToLower().Contains(_searchText.ToLower());
|
if (string.IsNullOrWhiteSpace(_searchText))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
CompareInfo compareInfo = CultureInfo.CurrentCulture.CompareInfo;
|
||||||
|
|
||||||
|
return compareInfo.IndexOf(app.TitleName, _searchText, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue