Skip to content

Commit

Permalink
fix: change default for ndt and dash in autorun
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Dec 11, 2024
1 parent bb7ae9f commit 7abd72c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fun PreferenceManager.resolveStatus(
sp.getBoolean(
getPreferenceKey(name = name, prefix = prefix, autoRun = true),
when(prefix.isEmpty()) {
true -> true
true -> autorunDefault(name = name)
false -> false
}
)
Expand Down Expand Up @@ -185,3 +185,11 @@ private fun PreferenceManager.setValue(name: String, value: Boolean): Boolean {
commit()
}
}

fun autorunDefault(name: String): Boolean {
return when (name) {
Ndt.NAME,
Dash.NAME -> false
else -> true
}
}

0 comments on commit 7abd72c

Please sign in to comment.