using american english for consistency
This commit is contained in:
parent
6526cf3c2e
commit
439224e4de
@ -27,7 +27,7 @@ import im.vector.app.core.services.GuardServiceStarter
|
|||||||
import im.vector.app.fdroid.service.FDroidGuardServiceStarter
|
import im.vector.app.fdroid.service.FDroidGuardServiceStarter
|
||||||
import im.vector.app.features.home.NightlyProxy
|
import im.vector.app.features.home.NightlyProxy
|
||||||
import im.vector.app.features.settings.VectorPreferences
|
import im.vector.app.features.settings.VectorPreferences
|
||||||
import im.vector.app.features.settings.legals.FlavourLegals
|
import im.vector.app.features.settings.legals.FlavorLegals
|
||||||
import im.vector.app.push.fcm.FdroidFcmHelper
|
import im.vector.app.push.fcm.FdroidFcmHelper
|
||||||
|
|
||||||
@InstallIn(SingletonComponent::class)
|
@InstallIn(SingletonComponent::class)
|
||||||
@ -48,7 +48,7 @@ abstract class FlavorModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
fun providesFlavorLegals() = object : FlavourLegals {
|
fun providesFlavorLegals() = object : FlavorLegals {
|
||||||
override fun hasThirdPartyNotices() = false
|
override fun hasThirdPartyNotices() = false
|
||||||
|
|
||||||
override fun navigateToThirdPartyNotices(context: Context) {
|
override fun navigateToThirdPartyNotices(context: Context) {
|
||||||
|
@ -19,10 +19,10 @@ package im.vector.app
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
|
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
|
||||||
import im.vector.app.features.settings.legals.FlavourLegals
|
import im.vector.app.features.settings.legals.FlavorLegals
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class GoogleFlavorLegals @Inject constructor() : FlavourLegals {
|
class GoogleFlavorLegals @Inject constructor() : FlavorLegals {
|
||||||
|
|
||||||
override fun hasThirdPartyNotices() = true
|
override fun hasThirdPartyNotices() = true
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import im.vector.app.GoogleFlavorLegals
|
|||||||
import im.vector.app.core.pushers.FcmHelper
|
import im.vector.app.core.pushers.FcmHelper
|
||||||
import im.vector.app.core.services.GuardServiceStarter
|
import im.vector.app.core.services.GuardServiceStarter
|
||||||
import im.vector.app.features.home.NightlyProxy
|
import im.vector.app.features.home.NightlyProxy
|
||||||
import im.vector.app.features.settings.legals.FlavourLegals
|
import im.vector.app.features.settings.legals.FlavorLegals
|
||||||
import im.vector.app.nightly.FirebaseNightlyProxy
|
import im.vector.app.nightly.FirebaseNightlyProxy
|
||||||
import im.vector.app.push.fcm.GoogleFcmHelper
|
import im.vector.app.push.fcm.GoogleFcmHelper
|
||||||
|
|
||||||
@ -47,5 +47,5 @@ abstract class FlavorModule {
|
|||||||
abstract fun bindsFcmHelper(fcmHelper: GoogleFcmHelper): FcmHelper
|
abstract fun bindsFcmHelper(fcmHelper: GoogleFcmHelper): FcmHelper
|
||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
abstract fun bindsFlavorLegals(legals: GoogleFlavorLegals): FlavourLegals
|
abstract fun bindsFlavorLegals(legals: GoogleFlavorLegals): FlavorLegals
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ package im.vector.app.features.settings.legals
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
|
||||||
interface FlavourLegals {
|
interface FlavorLegals {
|
||||||
fun hasThirdPartyNotices(): Boolean
|
fun hasThirdPartyNotices(): Boolean
|
||||||
fun navigateToThirdPartyNotices(context: Context)
|
fun navigateToThirdPartyNotices(context: Context)
|
||||||
}
|
}
|
@ -39,7 +39,7 @@ class LegalsController @Inject constructor(
|
|||||||
private val resources: Resources,
|
private val resources: Resources,
|
||||||
private val elementLegals: ElementLegals,
|
private val elementLegals: ElementLegals,
|
||||||
private val errorFormatter: ErrorFormatter,
|
private val errorFormatter: ErrorFormatter,
|
||||||
private val flavourLegals: FlavourLegals,
|
private val flavorLegals: FlavorLegals,
|
||||||
) : TypedEpoxyController<LegalsState>() {
|
) : TypedEpoxyController<LegalsState>() {
|
||||||
|
|
||||||
var listener: Listener? = null
|
var listener: Listener? = null
|
||||||
@ -135,7 +135,7 @@ class LegalsController @Inject constructor(
|
|||||||
clickListener { host.listener?.openThirdPartyNotice() }
|
clickListener { host.listener?.openThirdPartyNotice() }
|
||||||
}
|
}
|
||||||
// Only on Gplay
|
// Only on Gplay
|
||||||
if (flavourLegals.hasThirdPartyNotices()) {
|
if (flavorLegals.hasThirdPartyNotices()) {
|
||||||
discoveryPolicyItem {
|
discoveryPolicyItem {
|
||||||
id("eltpn2")
|
id("eltpn2")
|
||||||
name(host.stringProvider.getString(R.string.settings_other_third_party_notices))
|
name(host.stringProvider.getString(R.string.settings_other_third_party_notices))
|
||||||
|
@ -37,7 +37,7 @@ import javax.inject.Inject
|
|||||||
|
|
||||||
class LegalsFragment @Inject constructor(
|
class LegalsFragment @Inject constructor(
|
||||||
private val controller: LegalsController,
|
private val controller: LegalsController,
|
||||||
private val flavourLegals: FlavourLegals,
|
private val flavorLegals: FlavorLegals,
|
||||||
) : VectorBaseFragment<FragmentGenericRecyclerBinding>(),
|
) : VectorBaseFragment<FragmentGenericRecyclerBinding>(),
|
||||||
LegalsController.Listener {
|
LegalsController.Listener {
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class LegalsFragment @Inject constructor(
|
|||||||
|
|
||||||
override fun openThirdPartyNoticeGplay() {
|
override fun openThirdPartyNoticeGplay() {
|
||||||
if (firstThrottler.canHandle() is FirstThrottler.CanHandlerResult.Yes) {
|
if (firstThrottler.canHandle() is FirstThrottler.CanHandlerResult.Yes) {
|
||||||
flavourLegals.navigateToThirdPartyNotices(requireContext())
|
flavorLegals.navigateToThirdPartyNotices(requireContext())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user