Commit 198434ea authored by Mygod's avatar Mygod

Refine code style

parent ebd274a3
...@@ -104,6 +104,6 @@ When doing subscription updates, ...@@ -104,6 +104,6 @@ When doing subscription updates,
] ]
}, },
"udpdns": false "udpdns": false
}, }
] ]
``` ```
...@@ -49,7 +49,7 @@ class Acl { ...@@ -49,7 +49,7 @@ class Acl {
const val CHINALIST = "china-list" const val CHINALIST = "china-list"
const val CUSTOM_RULES = "custom-rules" const val CUSTOM_RULES = "custom-rules"
val networkAclParser = "^IMPORT_URL\\s*<(.+)>\\s*$".toRegex() private val networkAclParser = "^IMPORT_URL\\s*<(.+)>\\s*$".toRegex()
fun getFile(id: String, context: Context = Core.deviceStorage) = File(context.noBackupFilesDir, "$id.acl") fun getFile(id: String, context: Context = Core.deviceStorage) = File(context.noBackupFilesDir, "$id.acl")
......
...@@ -29,7 +29,7 @@ import java.net.URL ...@@ -29,7 +29,7 @@ import java.net.URL
class Subscription { class Subscription {
companion object { companion object {
const val SUBSCRIPTION = "subscription" private const val SUBSCRIPTION = "subscription"
var instance: Subscription var instance: Subscription
get() { get() {
......
...@@ -53,7 +53,7 @@ class SubscriptionService : Service(), CoroutineScope { ...@@ -53,7 +53,7 @@ class SubscriptionService : Service(), CoroutineScope {
private const val NOTIFICATION_CHANNEL = "service-subscription" private const val NOTIFICATION_CHANNEL = "service-subscription"
private const val NOTIFICATION_ID = 2 private const val NOTIFICATION_ID = 2
val idle = MutableLiveData<Boolean>(true) val idle = MutableLiveData(true)
val notificationChannel @RequiresApi(26) get() = NotificationChannel(NOTIFICATION_CHANNEL, val notificationChannel @RequiresApi(26) get() = NotificationChannel(NOTIFICATION_CHANNEL,
app.getText(R.string.service_subscription), NotificationManager.IMPORTANCE_LOW) app.getText(R.string.service_subscription), NotificationManager.IMPORTANCE_LOW)
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment