Fix user being asked for lock permissions when lock is not enabled.

This commit is contained in:
NerdNumber9 2017-03-09 17:17:18 -05:00
parent 1b8daa7e09
commit e212e4581d
2 changed files with 5 additions and 4 deletions

View File

@ -89,7 +89,6 @@ open class SourceManager(private val context: Context) {
)
private fun createEHSources(): List<Source> {
//TODO Fix and hook up to createSources...
val exSrcs = mutableListOf(
EHentai(EH_SOURCE_ID, false, context),
EHentaiMetadata(EH_METADATA_SOURCE_ID, false, context)

View File

@ -94,9 +94,10 @@ class MainActivity : BaseActivity() {
if (savedState == null) {
//Show lock
if(lockEnabled(preferences)) {
val lockEnabled = lockEnabled(preferences)
if(lockEnabled)
showLockActivity(this)
}
//Perform source migration
SourceMigrator().tryMigrationWithDialog(this, {
// Set start screen
@ -122,7 +123,8 @@ class MainActivity : BaseActivity() {
UrlMigrator().tryMigration()
//Check lock security
notifyLockSecurity(this)
if(lockEnabled)
notifyLockSecurity(this)
})
}
}