upgrade dagger (#1424)

This commit is contained in:
Konrad Pozniak 2019-07-28 20:00:19 +02:00 committed by GitHub
parent 8834c22120
commit 941cdf198a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 16 deletions

View file

@ -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

View file

@ -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
}

View file

@ -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
}