mirror of
https://github.com/Crunchy-DL/Crunchy-Downloader.git
synced 2026-04-23 18:02:10 +00:00
Add - Added **Include Crunchyroll Artists (Music)** in history to settings for expanded tracking Add - Added **filters to history tab** to hide series or artists for a cleaner view Add - Added a **toggle to include featured music** in series search results Chg - Made small changes to **sync timing** to more accurately detect delays Chg - Migrated settings to json file Fix - Fixed a **sync timing issue** with longer comparison videos to ensure proper synchronization Fix - Fixed issues with artist urls
26 lines
No EOL
859 B
C#
26 lines
No EOL
859 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Globalization;
|
|
using Avalonia.Data.Converters;
|
|
|
|
namespace CRD.Utils.UI;
|
|
|
|
public class UiListHasElementsConverter : IValueConverter{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture){
|
|
if (value is IEnumerable enumerable){
|
|
// Check if the collection has any elements
|
|
foreach (var _ in enumerable){
|
|
return true; // At least one element exists
|
|
}
|
|
|
|
return false; // No elements
|
|
}
|
|
|
|
// Return false if the input is not a collection or is null
|
|
return false;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture){
|
|
throw new NotSupportedException("ListToBooleanConverter does not support ConvertBack.");
|
|
}
|
|
} |