TimeTravel

This commit is contained in:
2022-01-31 23:13:39 +01:00
parent 80570d8895
commit c2dcb49016
78 changed files with 2294 additions and 363 deletions

View File

@@ -3,6 +3,7 @@ using FileTime.Avalonia.Application;
using FileTime.Avalonia.Models;
using FileTime.Avalonia.ViewModels;
using MvvmGen;
using System;
using System.Collections.Generic;
namespace FileTime.Avalonia.Services
@@ -20,9 +21,8 @@ namespace FileTime.Avalonia.Services
{
var nameLeft = itemViewModel.Item.Name;
while (nameLeft.ToLower().Contains(rapidTravelText))
while (nameLeft.ToLower().IndexOf(rapidTravelText, StringComparison.Ordinal) is int rapidTextStart && rapidTextStart != -1)
{
var rapidTextStart = nameLeft.ToLower().IndexOf(rapidTravelText);
var before = rapidTextStart > 0 ? nameLeft.Substring(0, rapidTextStart) : null;
var rapidTravel = nameLeft.Substring(rapidTextStart, rapidTravelText.Length);