Elwig: Use StringSplitOptions.RemoveEmptyEntries
Test / Run tests (push) Successful in 2m11s

This commit is contained in:
lorenz.stechauner committed 2026-11-25 14:26:31 +01:00
1 parent 4bb13dbb06
commit bc419ce57a
6 files changed
+11 -7

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
using CommunityToolkit.Mvvm.ComponentModel;
using Elwig.Helpers;
using Elwig.Models.Entities;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
@@ -18,7 +19,7 @@ namespace Elwig.ViewModels {
[ObservableProperty]
public partial string? SearchQuery { get; set; } = "";
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ').ToList().FindAll(e => e.Length > 0) ?? []];
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ', StringSplitOptions.RemoveEmptyEntries) ?? []];
[ObservableProperty]
public partial string? LastScaleError { get; set; }