Crunchy-Downloader/CRD/Views/SettingsPageView.axaml.cs

23 lines
564 B
C#

using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using CRD.Downloader;
using CRD.Downloader.Crunchyroll;
using CRD.Utils.Sonarr;
using CRD.ViewModels;
namespace CRD.Views;
public partial class SettingsPageView : UserControl{
public SettingsPageView(){
InitializeComponent();
}
private void OnUnloaded(object? sender, RoutedEventArgs e){
if (DataContext is SettingsPageViewModel viewModel){
SonarrClient.Instance.RefreshSonarr();
}
}
}