v0.3.5: update MainActivity.kt

This commit is contained in:
sanjeok77 committed 2026-08-25 02:11:10 +00:00
1 parent 9785f55b81
commit c9213d4b2f
1 file changed
+10 -1
@@ -40,6 +40,9 @@ class MainActivity : ComponentActivity() {
@Inject
lateinit var workerScheduler: WorkerScheduler
@Inject
lateinit var scraperManager: com.hotdeal.alarm.domain.usecase.HotDealScraperManager
private var downloadReceiver: BroadcastReceiver? = null
override fun onCreate(savedInstanceState: Bundle?) {
@@ -216,7 +219,13 @@ class MainActivity : ComponentActivity() {
override fun onResume() {
super.onResume()
if (isInBackground) {
workerScheduler.executeOnce()
lifecycleScope.launch {
try {
scraperManager.fetchAndProcessDeals()
} catch (e: Exception) {
// 무시
}
}
}
isInBackground = false
}