Fix app locking even if app lock is disabled

Hide fingerprint view if fingerprint is disabled
This commit is contained in:
NerdNumber9 2018-04-18 10:18:32 -04:00
parent d03c49db58
commit e7c48a98df
2 changed files with 9 additions and 5 deletions

View File

@ -158,15 +158,16 @@ class MainActivity : BaseActivity() {
// --> EH
//Hook long press hamburger menu to lock
getToolbarNavigationIcon(toolbar)?.setOnLongClickListener {
if(lockEnabled(preferences)) {
doLock(true)
vibrate(50) // Notify user of lock
true
} else false
}
//Show lock
if (savedInstanceState == null) {
val lockEnabled = lockEnabled(preferences)
if (lockEnabled) {
if (lockEnabled(preferences)) {
//Special case first lock
doLock()

View File

@ -74,6 +74,7 @@ class LockController : NucleusController<LockPresenter>() {
with(view) {
//Fingerprint
if (presenter.useFingerprint) {
swirl_container.visibility = View.VISIBLE
swirl_container.removeAllViews()
val icon = SwirlView(context).apply {
val size = dpToPx(context, 60)
@ -114,6 +115,8 @@ class LockController : NucleusController<LockPresenter>() {
}
}
}
} else {
swirl_container.visibility = View.GONE
}
}
}