upgrade dagger (#1424)
This commit is contained in:
parent
8834c22120
commit
941cdf198a
3 changed files with 11 additions and 16 deletions
|
@ -86,7 +86,7 @@ project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
|||
}
|
||||
}
|
||||
|
||||
ext.daggerVersion = '2.23.2'
|
||||
ext.daggerVersion = '2.24'
|
||||
ext.retrofitVersion = '2.6.0'
|
||||
|
||||
// if libraries are changed here, they should also be changed in LicenseActivity
|
||||
|
|
|
@ -2,23 +2,18 @@ package com.keylesspalace.tusky.components.instancemute
|
|||
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.keylesspalace.tusky.BaseActivity
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.components.instancemute.fragment.InstanceListFragment
|
||||
import dagger.android.AndroidInjector
|
||||
import dagger.android.DispatchingAndroidInjector
|
||||
import dagger.android.support.HasSupportFragmentInjector
|
||||
import dagger.android.HasAndroidInjector
|
||||
import javax.inject.Inject
|
||||
import kotlinx.android.synthetic.main.toolbar_basic.*
|
||||
|
||||
class InstanceListActivity: BaseActivity(), HasSupportFragmentInjector {
|
||||
@Inject
|
||||
lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector<Fragment>
|
||||
class InstanceListActivity: BaseActivity(), HasAndroidInjector {
|
||||
|
||||
override fun supportFragmentInjector(): AndroidInjector<Fragment>? {
|
||||
return dispatchingAndroidInjector
|
||||
}
|
||||
@Inject
|
||||
lateinit var androidInjector: DispatchingAndroidInjector<Any>
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -47,4 +42,6 @@ class InstanceListActivity: BaseActivity(), HasSupportFragmentInjector {
|
|||
return super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
||||
override fun androidInjector() = androidInjector
|
||||
|
||||
}
|
|
@ -21,7 +21,6 @@ import android.os.Bundle
|
|||
import android.text.Spanned
|
||||
import android.view.MenuItem
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import com.keylesspalace.tusky.BottomSheetActivity
|
||||
|
@ -30,18 +29,17 @@ import com.keylesspalace.tusky.components.report.adapter.ReportPagerAdapter
|
|||
import com.keylesspalace.tusky.di.ViewModelFactory
|
||||
import com.keylesspalace.tusky.util.HtmlUtils
|
||||
import com.keylesspalace.tusky.util.ThemeUtils
|
||||
import dagger.android.AndroidInjector
|
||||
import dagger.android.DispatchingAndroidInjector
|
||||
import dagger.android.support.HasSupportFragmentInjector
|
||||
import dagger.android.HasAndroidInjector
|
||||
import kotlinx.android.synthetic.main.activity_report.*
|
||||
import kotlinx.android.synthetic.main.toolbar_basic.*
|
||||
import javax.inject.Inject
|
||||
|
||||
|
||||
class ReportActivity : BottomSheetActivity(), HasSupportFragmentInjector {
|
||||
class ReportActivity : BottomSheetActivity(), HasAndroidInjector {
|
||||
|
||||
@Inject
|
||||
lateinit var dispatchingFragmentInjector: DispatchingAndroidInjector<Fragment>
|
||||
lateinit var androidInjector: DispatchingAndroidInjector<Any>
|
||||
|
||||
@Inject
|
||||
lateinit var viewModelFactory: ViewModelFactory
|
||||
|
@ -158,5 +156,5 @@ class ReportActivity : BottomSheetActivity(), HasSupportFragmentInjector {
|
|||
}
|
||||
}
|
||||
|
||||
override fun supportFragmentInjector(): AndroidInjector<Fragment> = dispatchingFragmentInjector
|
||||
override fun androidInjector() = androidInjector
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue