Rename ActivityScope to ActivityScoped

pull/1020/head
Alex Baker 4 years ago
parent c9407d3ef8
commit b1e0ab6d67

@ -11,13 +11,13 @@ import org.tasks.location.PlaceSearchProvider
@Module
class LocationModule {
@Provides
@ActivityScope
@ActivityScoped
fun getPlaceSearchProvider(@ApplicationContext context: Context): PlaceSearchProvider {
return MapboxSearchProvider(context)
}
@Provides
@ActivityScope
@ActivityScoped
fun getMapFragment(@ApplicationContext context: Context): MapFragment {
return MapboxMapFragment(context)
}

@ -11,7 +11,7 @@ import org.tasks.preferences.Preferences
@Module
internal class LocationModule {
@Provides
@ActivityScope
@ActivityScoped
fun getPlaceSearchProvider(
@ApplicationContext context: Context,
preferences: Preferences,
@ -27,7 +27,7 @@ internal class LocationModule {
}
@Provides
@ActivityScope
@ActivityScoped
fun getMapFragment(@ApplicationContext context: Context, preferences: Preferences): MapFragment {
return if (preferences.useGoogleMaps()) {
GoogleMapFragment(context)

@ -32,7 +32,7 @@ import org.tasks.widget.ShortcutConfigActivity
import org.tasks.widget.WidgetClickActivity
import org.tasks.widget.WidgetConfigActivity
@ActivityScope
@ActivityScoped
@Subcomponent(modules = [ActivityModule::class, LocationModule::class])
interface ActivityComponent {
operator fun plus(module: FragmentModule): FragmentComponent

@ -21,17 +21,17 @@ class ActivityModule(@get:Provides val activity: Activity) {
get() = activity
@Provides
@ActivityScope
@ActivityScoped
fun getThemeBase(preferences: Preferences, inventory: Inventory): ThemeBase
= ThemeBase.getThemeBase(preferences, inventory, activity.intent)
@Provides
@ActivityScope
@ActivityScoped
fun getThemeColor(colorProvider: ColorProvider, preferences: Preferences): ThemeColor
= colorProvider.getThemeColor(preferences.defaultThemeColor, true)
@Provides
@ActivityScope
@ActivityScoped
fun getThemeAccent(colorProvider: ColorProvider, preferences: Preferences): ThemeAccent
= colorProvider.getThemeAccent(preferences.getInt(R.string.p_theme_accent, 1))
}

@ -4,4 +4,4 @@ import javax.inject.Scope
@Scope
@Retention(AnnotationRetention.RUNTIME)
internal annotation class ActivityScope
internal annotation class ActivityScoped
Loading…
Cancel
Save