Fix app locking even if app lock is disabled
Hide fingerprint view if fingerprint is disabled
This commit is contained in:
parent
d03c49db58
commit
e7c48a98df
@ -158,15 +158,16 @@ class MainActivity : BaseActivity() {
|
|||||||
// --> EH
|
// --> EH
|
||||||
//Hook long press hamburger menu to lock
|
//Hook long press hamburger menu to lock
|
||||||
getToolbarNavigationIcon(toolbar)?.setOnLongClickListener {
|
getToolbarNavigationIcon(toolbar)?.setOnLongClickListener {
|
||||||
|
if(lockEnabled(preferences)) {
|
||||||
doLock(true)
|
doLock(true)
|
||||||
vibrate(50) // Notify user of lock
|
vibrate(50) // Notify user of lock
|
||||||
true
|
true
|
||||||
|
} else false
|
||||||
}
|
}
|
||||||
|
|
||||||
//Show lock
|
//Show lock
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
val lockEnabled = lockEnabled(preferences)
|
if (lockEnabled(preferences)) {
|
||||||
if (lockEnabled) {
|
|
||||||
//Special case first lock
|
//Special case first lock
|
||||||
doLock()
|
doLock()
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ class LockController : NucleusController<LockPresenter>() {
|
|||||||
with(view) {
|
with(view) {
|
||||||
//Fingerprint
|
//Fingerprint
|
||||||
if (presenter.useFingerprint) {
|
if (presenter.useFingerprint) {
|
||||||
|
swirl_container.visibility = View.VISIBLE
|
||||||
swirl_container.removeAllViews()
|
swirl_container.removeAllViews()
|
||||||
val icon = SwirlView(context).apply {
|
val icon = SwirlView(context).apply {
|
||||||
val size = dpToPx(context, 60)
|
val size = dpToPx(context, 60)
|
||||||
@ -114,6 +115,8 @@ class LockController : NucleusController<LockPresenter>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
swirl_container.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user