From 85710ad994b373d3199594d3bb84c980f399e1a8 Mon Sep 17 00:00:00 2001 From: aiqinxuancai Date: Sat, 25 May 2024 14:53:34 +0800 Subject: [PATCH] fix bug --- Aria2Fast/View/AddSubscriptionView.xaml.cs | 6 +++++- Aria2Fast/View/MikanAnimeRssView.xaml.cs | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Aria2Fast/View/AddSubscriptionView.xaml.cs b/Aria2Fast/View/AddSubscriptionView.xaml.cs index 9ac5e8b..995c747 100644 --- a/Aria2Fast/View/AddSubscriptionView.xaml.cs +++ b/Aria2Fast/View/AddSubscriptionView.xaml.cs @@ -57,7 +57,11 @@ private void Page_DataContextChanged(object sender, DependencyPropertyChangedEve UrlTextBox.Text = obj.Item1; //订阅地址 _customNamePath = obj.Item2; //指定订阅存储名称 _anime = obj.Item3; - _subscriptionModel = obj.Item4; + if (!string.IsNullOrEmpty(obj.Item4.Url)) + { + _subscriptionModel = obj.Item4; + } + TextBoxRssPath.Text = _customNamePath; // diff --git a/Aria2Fast/View/MikanAnimeRssView.xaml.cs b/Aria2Fast/View/MikanAnimeRssView.xaml.cs index c9d78a6..d32c1c8 100644 --- a/Aria2Fast/View/MikanAnimeRssView.xaml.cs +++ b/Aria2Fast/View/MikanAnimeRssView.xaml.cs @@ -1,4 +1,5 @@ using Aria2Fast.Service.Model; +using Aria2Fast.Service.Model.SubscriptionModel; using System; using System.Collections.Generic; using System.Linq; @@ -37,7 +38,7 @@ private void Border_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) //MainWindow.Instance.RootNavigation.NavigateWithHierarchy(typeof(MikanAnimeRssView), animeItem); //弹出订阅页面? //MainWindow.Instance.RootNavigation.IsBackButtonVisible = Wpf.Ui.Controls.NavigationViewBackButtonVisible.Visible; - MainWindow.Instance.RootNavigation.Navigate(typeof(AddSubscriptionView), (mikanAnimeRss.Url, mikanAnime.Name, mikanAnime)); + MainWindow.Instance.RootNavigation.Navigate(typeof(AddSubscriptionView), (mikanAnimeRss.Url, mikanAnime.Name, mikanAnime, new SubscriptionModel())); } } }