From 1cf3f4e77c50cea62c938ddd50b331d80034f20a Mon Sep 17 00:00:00 2001 From: Mike Scamell Date: Mon, 16 Dec 2024 16:48:00 +0100 Subject: [PATCH] formatting --- .../impl/settings/plugins/SubsSettingsPlugins.kt | 4 ++-- .../subscriptions/impl/settings/views/PirSettingView.kt | 2 -- .../subscriptions/impl/pir/RealPirSubscriptionManagerTest.kt | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/plugins/SubsSettingsPlugins.kt b/subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/plugins/SubsSettingsPlugins.kt index b8d8cb433784..1772be48727b 100644 --- a/subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/plugins/SubsSettingsPlugins.kt +++ b/subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/plugins/SubsSettingsPlugins.kt @@ -25,8 +25,8 @@ import com.duckduckgo.settings.api.NewSettingsFeature import com.duckduckgo.settings.api.ProSettingsPlugin import com.duckduckgo.subscriptions.impl.R import com.duckduckgo.subscriptions.impl.settings.views.ItrSettingView -import com.duckduckgo.subscriptions.impl.settings.views.LegacyProSettingView import com.duckduckgo.subscriptions.impl.settings.views.LegacyPirSettingView +import com.duckduckgo.subscriptions.impl.settings.views.LegacyProSettingView import com.duckduckgo.subscriptions.impl.settings.views.PirSettingView import com.duckduckgo.subscriptions.impl.settings.views.ProSettingView import com.squareup.anvil.annotations.ContributesMultibinding @@ -58,7 +58,7 @@ class ProSettings @Inject constructor(private val newSettingsFeature: NewSetting @PriorityKey(300) class PIRSettings @Inject constructor(private val newSettingsFeature: NewSettingsFeature) : ProSettingsPlugin { override fun getView(context: Context): View { - return if(newSettingsFeature.self().isEnabled()){ + return if (newSettingsFeature.self().isEnabled()) { PirSettingView(context) } else { LegacyPirSettingView(context) diff --git a/subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/views/PirSettingView.kt b/subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/views/PirSettingView.kt index 37aa71a0019c..b08b6bc53792 100644 --- a/subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/views/PirSettingView.kt +++ b/subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/views/PirSettingView.kt @@ -25,8 +25,6 @@ import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.findViewTreeLifecycleOwner import androidx.lifecycle.findViewTreeViewModelStoreOwner import com.duckduckgo.anvil.annotations.InjectWith -import com.duckduckgo.common.ui.view.gone -import com.duckduckgo.common.ui.view.show import com.duckduckgo.common.ui.viewbinding.viewBinding import com.duckduckgo.common.utils.ConflatedJob import com.duckduckgo.common.utils.ViewViewModelFactory diff --git a/subscriptions/subscriptions-impl/src/test/java/com/duckduckgo/subscriptions/impl/pir/RealPirSubscriptionManagerTest.kt b/subscriptions/subscriptions-impl/src/test/java/com/duckduckgo/subscriptions/impl/pir/RealPirSubscriptionManagerTest.kt index 6e062cb55dbf..4fa282dd96d1 100644 --- a/subscriptions/subscriptions-impl/src/test/java/com/duckduckgo/subscriptions/impl/pir/RealPirSubscriptionManagerTest.kt +++ b/subscriptions/subscriptions-impl/src/test/java/com/duckduckgo/subscriptions/impl/pir/RealPirSubscriptionManagerTest.kt @@ -25,7 +25,6 @@ import com.duckduckgo.subscriptions.api.SubscriptionStatus import com.duckduckgo.subscriptions.api.Subscriptions import com.duckduckgo.subscriptions.impl.pir.PirSubscriptionManager.PirStatus import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.test.runTest import org.junit.Assert.assertEquals @@ -132,7 +131,6 @@ class RealPirSubscriptionManagerTest { awaitComplete() } } - } private class FakeSubscriptions( @@ -154,7 +152,7 @@ private class FakeSubscriptions( override fun launchPrivacyPro( context: Context, - uri: Uri? + uri: Uri?, ) { // no-op }