Fix user being asked for lock permissions when lock is not enabled.
This commit is contained in:
parent
1b8daa7e09
commit
e212e4581d
@ -89,7 +89,6 @@ open class SourceManager(private val context: Context) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
private fun createEHSources(): List<Source> {
|
private fun createEHSources(): List<Source> {
|
||||||
//TODO Fix and hook up to createSources...
|
|
||||||
val exSrcs = mutableListOf(
|
val exSrcs = mutableListOf(
|
||||||
EHentai(EH_SOURCE_ID, false, context),
|
EHentai(EH_SOURCE_ID, false, context),
|
||||||
EHentaiMetadata(EH_METADATA_SOURCE_ID, false, context)
|
EHentaiMetadata(EH_METADATA_SOURCE_ID, false, context)
|
||||||
|
@ -94,9 +94,10 @@ class MainActivity : BaseActivity() {
|
|||||||
|
|
||||||
if (savedState == null) {
|
if (savedState == null) {
|
||||||
//Show lock
|
//Show lock
|
||||||
if(lockEnabled(preferences)) {
|
val lockEnabled = lockEnabled(preferences)
|
||||||
|
if(lockEnabled)
|
||||||
showLockActivity(this)
|
showLockActivity(this)
|
||||||
}
|
|
||||||
//Perform source migration
|
//Perform source migration
|
||||||
SourceMigrator().tryMigrationWithDialog(this, {
|
SourceMigrator().tryMigrationWithDialog(this, {
|
||||||
// Set start screen
|
// Set start screen
|
||||||
@ -122,7 +123,8 @@ class MainActivity : BaseActivity() {
|
|||||||
UrlMigrator().tryMigration()
|
UrlMigrator().tryMigration()
|
||||||
|
|
||||||
//Check lock security
|
//Check lock security
|
||||||
notifyLockSecurity(this)
|
if(lockEnabled)
|
||||||
|
notifyLockSecurity(this)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user