Skip to content

Commit 53e401f

Browse files
authored
Perform authentication if needed for AutomaticResponse setting
1 parent d276835 commit 53e401f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/apk/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsViewModel.kt

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import com.topjohnwu.magisk.BR
1313
import com.topjohnwu.magisk.arch.BaseViewModel
1414
import com.topjohnwu.magisk.core.AppContext
1515
import com.topjohnwu.magisk.core.BuildConfig
16+
import com.topjohnwu.magisk.core.Config
1617
import com.topjohnwu.magisk.core.Const
1718
import com.topjohnwu.magisk.core.Info
1819
import com.topjohnwu.magisk.core.R
@@ -92,6 +93,7 @@ class SettingsViewModel : BaseViewModel(), BaseSettingsItem.Handler {
9293
DownloadPath -> withExternalRW(doAction)
9394
UpdateChecker -> withPostNotificationPermission(doAction)
9495
Authentication -> AuthEvent(doAction).publish()
96+
AutomaticResponse -> if (Config.suAuth) AuthEvent(doAction).publish() else doAction()
9597
else -> doAction()
9698
}
9799
}

0 commit comments

Comments
 (0)