mirror of
https://github.com/tuskyapp/Tusky
synced 2024-12-25 00:11:15 +01:00
upgrade dagger (#1424)
This commit is contained in:
parent
8834c22120
commit
941cdf198a
@ -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'
|
ext.retrofitVersion = '2.6.0'
|
||||||
|
|
||||||
// if libraries are changed here, they should also be changed in LicenseActivity
|
// 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.os.Bundle
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import com.keylesspalace.tusky.BaseActivity
|
import com.keylesspalace.tusky.BaseActivity
|
||||||
import com.keylesspalace.tusky.R
|
import com.keylesspalace.tusky.R
|
||||||
import com.keylesspalace.tusky.components.instancemute.fragment.InstanceListFragment
|
import com.keylesspalace.tusky.components.instancemute.fragment.InstanceListFragment
|
||||||
import dagger.android.AndroidInjector
|
|
||||||
import dagger.android.DispatchingAndroidInjector
|
import dagger.android.DispatchingAndroidInjector
|
||||||
import dagger.android.support.HasSupportFragmentInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlinx.android.synthetic.main.toolbar_basic.*
|
import kotlinx.android.synthetic.main.toolbar_basic.*
|
||||||
|
|
||||||
class InstanceListActivity: BaseActivity(), HasSupportFragmentInjector {
|
class InstanceListActivity: BaseActivity(), HasAndroidInjector {
|
||||||
@Inject
|
|
||||||
lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector<Fragment>
|
|
||||||
|
|
||||||
override fun supportFragmentInjector(): AndroidInjector<Fragment>? {
|
@Inject
|
||||||
return dispatchingAndroidInjector
|
lateinit var androidInjector: DispatchingAndroidInjector<Any>
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
@ -47,4 +42,6 @@ class InstanceListActivity: BaseActivity(), HasSupportFragmentInjector {
|
|||||||
return super.onOptionsItemSelected(item)
|
return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun androidInjector() = androidInjector
|
||||||
|
|
||||||
}
|
}
|
@ -21,7 +21,6 @@ import android.os.Bundle
|
|||||||
import android.text.Spanned
|
import android.text.Spanned
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import androidx.appcompat.content.res.AppCompatResources
|
import androidx.appcompat.content.res.AppCompatResources
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import androidx.lifecycle.ViewModelProviders
|
import androidx.lifecycle.ViewModelProviders
|
||||||
import com.keylesspalace.tusky.BottomSheetActivity
|
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.di.ViewModelFactory
|
||||||
import com.keylesspalace.tusky.util.HtmlUtils
|
import com.keylesspalace.tusky.util.HtmlUtils
|
||||||
import com.keylesspalace.tusky.util.ThemeUtils
|
import com.keylesspalace.tusky.util.ThemeUtils
|
||||||
import dagger.android.AndroidInjector
|
|
||||||
import dagger.android.DispatchingAndroidInjector
|
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.activity_report.*
|
||||||
import kotlinx.android.synthetic.main.toolbar_basic.*
|
import kotlinx.android.synthetic.main.toolbar_basic.*
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
|
||||||
class ReportActivity : BottomSheetActivity(), HasSupportFragmentInjector {
|
class ReportActivity : BottomSheetActivity(), HasAndroidInjector {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var dispatchingFragmentInjector: DispatchingAndroidInjector<Fragment>
|
lateinit var androidInjector: DispatchingAndroidInjector<Any>
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var viewModelFactory: ViewModelFactory
|
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 New Issue
Block a user