fix profile reload detect
This commit is contained in:
3 files changed
+5
-6
No files matched your search
@@ -40,7 +40,7 @@ class ClashService : BaseService() {
|
||||
|
||||
stopSelf()
|
||||
} else {
|
||||
broadcastProfileLoaded()
|
||||
service.broadcastProfileLoaded()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,16 +58,16 @@ class ClashRuntime(private val context: Context) {
|
||||
try {
|
||||
Clash.start()
|
||||
|
||||
modules.forEach {
|
||||
it.onStart()
|
||||
}
|
||||
|
||||
context.registerReceiver(receiver, IntentFilter().apply {
|
||||
modules.flatMap { it.receiveBroadcasts }.distinct().forEach {
|
||||
addAction(it)
|
||||
}
|
||||
}, Permissions.PERMISSION_RECEIVE_BROADCASTS, null)
|
||||
|
||||
modules.forEach {
|
||||
it.onStart()
|
||||
}
|
||||
|
||||
while (isActive) {
|
||||
tickerEnabled = modules.any { it.enableTicker }
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.github.kr328.clash.service.data
|
||||
|
||||
import android.app.NotificationManager
|
||||
import android.content.ContentValues
|
||||
import android.content.Context
|
||||
import android.database.sqlite.SQLiteDatabase
|
||||
|
||||
Reference in new issue
Block a user