增加GPS星历有效期更新 2234/target/4 2240/1 2240/head 2241/target/1
authorCaisking <Casiking@zhihuishixun.com>
Sat, 13 Sep 2025 11:17:58 +0000 (19:17 +0800)
committerCaisking <Casiking@zhihuishixun.com>
Sat, 13 Sep 2025 11:17:58 +0000 (19:17 +0800)
code/sdk/application/wearable/fd230/nativeapp/nativeui/ephemeris_download/src/EphemerisDownloadPresenter.cpp

index a315fb7..d3caf08 100644 (file)
@@ -97,7 +97,6 @@ void EphemerisDownloadPresenter::Notify() {
       if (EphemerisDownloadView::GetInstance()->GetDownloadLabel()) {
         EphemerisDownloadView::GetInstance()->GetDownloadLabel()->SetText(
             "下载成功");
-        //更新有效期
       }
     }
     break;
@@ -107,10 +106,6 @@ void EphemerisDownloadPresenter::Notify() {
         EphemerisDownloadView::GetInstance()->GetDownloadLabel()->SetText(
             "下载失败");
       }
-      if (EphemerisDownloadView::GetInstance()->GetValidityPeriodLabel()) {
-        EphemerisDownloadView::GetInstance()->GetValidityPeriodLabel()->SetText(
-            "无星历数据");
-      }
     }
     break;
   case EphemerisDownloadStatus::NOT_DOWNLOADED:
@@ -119,13 +114,14 @@ void EphemerisDownloadPresenter::Notify() {
         EphemerisDownloadView::GetInstance()->GetDownloadLabel()->SetText(
             "未下载");
       }
-      if (EphemerisDownloadView::GetInstance()->GetValidityPeriodLabel()) {
-        EphemerisDownloadView::GetInstance()->GetValidityPeriodLabel()->SetText(
-            "无星历数据");
-      }
     }
     break;
   }
+  //更新有效期
+  if(EphemerisDownloadView::GetInstance()->GetValidityPeriodLabel()) {
+    EphemerisDownloadView::GetInstance()->GetValidityPeriodLabel()->SetText(
+        EphemerisDownloadModel::GetInstance().GetEphemerisValidityPeriod().c_str());
+  }
 }
 
 } // namespace OHOS