fix notification not show profile
This commit is contained in:
2 files changed
+4
-1
No files matched your search
@@ -143,6 +143,9 @@ class ClashCore(private val service: Service) : CoroutineScope by MainScope() {
|
||||
|
||||
notification.setProfile(active.name)
|
||||
|
||||
if (!settings.get(ServiceSettings.NOTIFICATION_REFRESH))
|
||||
notification.updateBase()
|
||||
|
||||
broadcastProfileLoaded(service)
|
||||
} catch (e: Exception) {
|
||||
stopSelf(e.message ?: "Unknown")
|
||||
|
||||
@@ -66,7 +66,7 @@ class ClashNotification(
|
||||
context.startForeground(CLASH_STATUS_NOTIFICATION_ID, notification)
|
||||
}
|
||||
|
||||
private fun updateBase() {
|
||||
fun updateBase() {
|
||||
val notification = baseBuilder
|
||||
.setContentTitle(currentProfile)
|
||||
.setContentText(context.getText(R.string.running))
|
||||
|
||||
Reference in new issue
Block a user