From 731667db1ac658a6f6064ef328d04eb1d47c20ff Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期一, 31 三月 2025 13:53:02 +0800
Subject: [PATCH] fix 登录

---
 app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt b/app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt
index 6d8b8fe..eee2467 100644
--- a/app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt
+++ b/app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt
@@ -39,4 +39,10 @@
     fun insert(code: Code) = viewModelScope.launch {
         repository.insert(code)
     }
+
+    fun getCurrentWeekStats(date: Long) =
+        repository.getCurrentWeekStats(date).asLiveData()
+
+    fun getCurrentYearStats(date: Long) =
+        repository.getCurrentYearStats(date).asLiveData()
 }
\ No newline at end of file

--
Gitblit v1.9.3