Idk, dev work goin on
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using WinWARP.Core.Services.Interfaces;
|
||||
|
||||
|
||||
namespace WinWARP.Core.ViewModels.Dialogs;
|
||||
|
||||
public partial class AddSubscriptionViewModel(ISubscriptionFetcher subscriptionFetcher, ILocalizationService localizationService) : ObservableObject
|
||||
{
|
||||
private readonly ISubscriptionFetcher _subscriptionFetcher = subscriptionFetcher;
|
||||
private readonly ILocalizationService _localizationService = localizationService;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(CanSubmit))]
|
||||
public partial string SubscriptionLink
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string CustomName
|
||||
{
|
||||
get; set;
|
||||
} = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
public partial int UpdateInterval
|
||||
{
|
||||
get; set;
|
||||
} = 0;
|
||||
|
||||
public bool CanSubmit => _subscriptionFetcher.IsUrlValid(SubscriptionLink);
|
||||
}
|
||||
Reference in New Issue
Block a user