mirror of
https://github.com/CherretGit/zaprett-app.git
synced 2025-12-23 12:09:38 +05:00
micro bug fix
This commit is contained in:
@@ -14,6 +14,7 @@ import androidx.core.app.NotificationCompat
|
||||
import com.cherret.zaprett.MainActivity
|
||||
import com.cherret.zaprett.R
|
||||
import com.cherret.zaprett.data.ServiceStatus
|
||||
import com.cherret.zaprett.utils.disableList
|
||||
import com.cherret.zaprett.utils.getActiveExcludeLists
|
||||
import com.cherret.zaprett.utils.getActiveLists
|
||||
import com.cherret.zaprett.utils.getActiveStrategy
|
||||
@@ -205,11 +206,15 @@ class ByeDpiVpnService : VpnService() {
|
||||
withContext(Dispatchers.IO) {
|
||||
hostlist.printWriter().use { out ->
|
||||
lists.forEach {
|
||||
if (it.exists()) {
|
||||
it.bufferedReader().useLines {
|
||||
it.forEach {
|
||||
out.println(it)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
disableList(it.name, sharedPreferences)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,9 +196,7 @@ private fun UpdateCard(updateAvailable: MutableState<Boolean>, onClick: () -> Un
|
||||
colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(start = 10.dp, top = 10.dp, end = 10.dp)
|
||||
.width(140.dp)
|
||||
.height(70.dp),
|
||||
.padding(start = 10.dp, top = 10.dp, end = 10.dp),
|
||||
onClick = onClick
|
||||
) {
|
||||
Text(
|
||||
|
||||
@@ -84,6 +84,7 @@ fun setStartOnBoot(startOnBoot: Boolean) {
|
||||
|
||||
fun getStartOnBoot(): Boolean {
|
||||
val configFile = getConfigFile()
|
||||
if (configFile.exists()) {
|
||||
val props = Properties()
|
||||
return try {
|
||||
if (configFile.exists()) {
|
||||
@@ -98,6 +99,8 @@ fun getStartOnBoot(): Boolean {
|
||||
false
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
fun getZaprettPath(): String {
|
||||
val props = Properties()
|
||||
Reference in New Issue
Block a user