Dilar: fix NPE during extension loading (#2227)
This commit is contained in:
parent
63c1a534a2
commit
01ab21ab4a
|
@ -2,7 +2,7 @@ ext {
|
||||||
extName = 'Dilar'
|
extName = 'Dilar'
|
||||||
extClass = '.Dilar'
|
extClass = '.Dilar'
|
||||||
themePkg = 'gmanga'
|
themePkg = 'gmanga'
|
||||||
overrideVersionCode = 1
|
overrideVersionCode = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -61,10 +61,11 @@ class Dilar :
|
||||||
else -> preferences.getString(MIRROR_PREF_KEY, MIRROR_PREF_DEFAULT_VALUE)!!
|
else -> preferences.getString(MIRROR_PREF_KEY, MIRROR_PREF_DEFAULT_VALUE)!!
|
||||||
}
|
}
|
||||||
|
|
||||||
override val baseUrl = mirrorPref()
|
override val baseUrl by lazy { mirrorPref() }
|
||||||
|
|
||||||
private val preferences: SharedPreferences =
|
override val cdnUrl by lazy { baseUrl }
|
||||||
|
|
||||||
|
private val preferences: SharedPreferences by lazy {
|
||||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||||
|
}
|
||||||
override val cdnUrl = baseUrl
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue