From a4e9d02ce5cfc501ef9fecac0047c332b5426df2 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 14 八月 2023 15:16:01 +0800
Subject: [PATCH] 2023年08月14日15:15:49

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/DetailPage.cs |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/DetailPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/DetailPage.cs
index 8ae8e68..c3b59a0 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/DetailPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/DetailPage.cs
@@ -198,7 +198,7 @@
                 Y = btnYear.Bottom + Application.GetRealHeight(20),
                 Width = Application.GetRealWidth(45),
                 Height = Application.GetRealHeight(43),
-                Text = movieLibrary.rating,
+                Text = movieLibraryInfo == null ? "" : movieLibraryInfo.rating,
                 TextSize = 32,
                 TextColor = MusicColor.TextColor,
                 TextAlignment = TextAlignment.CenterLeft,
@@ -218,7 +218,6 @@
                 TextColor = 0xffA5AEBC,
                 TextSize = TextSize.Text12,
                 TextAlignment = TextAlignment.CenterLeft,
-                Text = movieLibraryInfo == null ? "" : movieLibraryInfo.rating,
             };
             baseFramLayout.AddChidren(btnScore);
 
@@ -234,6 +233,7 @@
                 IsSelected = movieLibraryInfo == null ? false : movieLibraryInfo.collect,
             };
             baseFramLayout.AddChidren(btnCollectImage);
+
 
             btnCollectText = new Button
             {
@@ -395,7 +395,7 @@
             //杩斿洖
             this.topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
             {
-                action(isOldState != btnCollectImage.IsSelected);
+                action?.Invoke(isOldState != btnCollectImage.IsSelected);
                 this.RemoveFromParent();
             };
             //绔嬪嵆鎾斁
@@ -438,18 +438,29 @@
                          var isBool = SendMethod.Current.IsCollect(remoteControl.deviceId, remoteControl.rcId, movieLibrary.movieId, btnCollectImage.IsSelected);
                          if (isBool)
                          {
+                             //鏇存柊缂撳瓨鏁版嵁
+                             movieLibraryInfo.collect = btnCollectImage.IsSelected;
                              //鎴愬姛鍚庢墠鏇存柊缂撳瓨鏁版嵁
                              if (btnCollectImage.IsSelected)
                              {
+                                 
                                  AksCommonMethod.Current.AddCollectMovie(movieLibrary);
                              }
                              else
                              {
                                  AksCommonMethod.Current.DelCollectMovie(movieLibrary);
                              }
+                           
                          }
                      }
                      catch { }
+                     finally
+                     {
+                         CommonMethod.Current.MainThread(() =>
+                         {
+                             CommonMethod.Current.Loading.Hide();
+                         });
+                     }
                  });
              };
             btnCollectImage.MouseUpEventHandler += CollectClick;

--
Gitblit v1.8.0