From 1a281d8354622a3606360f9f9a7fe4bb7d6a2c3a Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期日, 27 四月 2025 13:22:26 +0800
Subject: [PATCH] fix 短信

---
 app/src/main/java/com/example/firstapp/App.kt |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/src/main/java/com/example/firstapp/App.kt b/app/src/main/java/com/example/firstapp/App.kt
index 1a0b34c..d672f03 100644
--- a/app/src/main/java/com/example/firstapp/App.kt
+++ b/app/src/main/java/com/example/firstapp/App.kt
@@ -16,6 +16,7 @@
 import com.example.firstapp.database.repository.CodeRepository
 import com.example.firstapp.database.repository.KeywordRepository
 import com.example.firstapp.database.repository.MsgRepository
+import com.example.firstapp.database.repository.ReminderRepository
 import com.example.firstapp.database.service.RetrofitClient
 import com.example.firstapp.receiver.CactusReceiver
 import com.example.firstapp.service.ReminderWorker
@@ -47,6 +48,7 @@
     val msgRepository by lazy { MsgRepository(database.msgDao()) }
     val codeRepository by lazy { CodeRepository(database.codeDao()) }
     val keywordRepository by lazy { KeywordRepository(RetrofitClient.apiService,database.keywordDao()) }
+    val reminderRepository by lazy { ReminderRepository(this) }
 
     companion object {
         const val TAG: String = "SmsForwarder"
@@ -131,6 +133,8 @@
             context = applicationContext
             initLibs()
             PreferencesManager.init(this)
+            // 初始化RetrofitClient
+            RetrofitClient.init(this)
 
             try {
                 if (SettingUtils.enablePureClientMode) return
@@ -458,8 +462,8 @@
         
         // 仅在特定时间执行(每天指定时间)
         // 可根据需要设置多个不同时间点的提醒
-        ReminderWorker.setupScheduledWorker(this, 9, 0)  // 上午9:00
-        ReminderWorker.setupScheduledWorker(this, 13, 50) // 下午13:50
+        //ReminderWorker.setupScheduledWorker(this, 9, 50)  // 上午9:00
+        ReminderWorker.setupScheduledWorker(this, 10, 50) // 下午13:50
         
         // 不再使用周期性轮询和立即执行的方式
     }

--
Gitblit v1.9.3