From 3433f3e9a0254b24cec2836b112267b1af3f9101 Mon Sep 17 00:00:00 2001
From: tj <1378534974@qq.com>
Date: 星期一, 07 四月 2025 10:57:40 +0800
Subject: [PATCH] 1.jks打包相关修改 2.vip续费页面相关修改
---
app/src/main/java/com/example/firstapp/ui/dashboard/DashboardViewModel.kt | 8 ++++++++
1 files changed, 8 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..1a0a2cb 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
@@ -4,6 +4,7 @@
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.asLiveData
import androidx.lifecycle.viewModelScope
+import androidx.room.RewriteQueriesToDropUnusedColumns
import com.example.firstapp.AppDatabase
import com.example.firstapp.database.entity.Code
import com.example.firstapp.database.repository.CodeRepository
@@ -26,6 +27,7 @@
fun getYearlyHeatmap(date: Long) = repository.getYearlyHeatmap(date).asLiveData()
+
fun getWeeklyStats(date: Long, weekCount: Int = 6) =
repository.getWeeklyStats(date, weekCount).asLiveData()
@@ -39,4 +41,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