fixed some crashes
This commit is contained in:
parent
9d0994153d
commit
680b7319f4
|
@ -1 +0,0 @@
|
||||||
org.mariotaku.twidere.util.premium.DummyExtraFeaturesService
|
|
|
@ -47,7 +47,9 @@ abstract class ExtraFeaturesService {
|
||||||
const val FEATURE_SCHEDULE_STATUS = "schedule_status"
|
const val FEATURE_SCHEDULE_STATUS = "schedule_status"
|
||||||
|
|
||||||
fun newInstance(context: Context): ExtraFeaturesService {
|
fun newInstance(context: Context): ExtraFeaturesService {
|
||||||
val instance = ServiceLoader.load(ExtraFeaturesService::class.java).first()
|
val instance = ServiceLoader.load(ExtraFeaturesService::class.java).firstOrNull() ?: run {
|
||||||
|
return@run DummyExtraFeaturesService()
|
||||||
|
}
|
||||||
instance.init(context)
|
instance.init(context)
|
||||||
return instance
|
return instance
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue