Skip to content

Commit 50b2b88

Browse files
committed
Remove CredentialsChangedNotifier event bus, superseded by the detector
#22926's first-login hardening signalled credential establishment through a process-global CredentialsChangedNotifier that the banner collected against a re-read of getSelectedSite() — the staleness race called out in #22942. EditorCapabilityDetector.refresh(storedSite), called from the mint path on the exact mutated SiteModel, replaces that coordination, so drop the notifier and its wiring in ApplicationPasswordLoginHelper.
1 parent 6956b64 commit 50b2b88

3 files changed

Lines changed: 1 addition & 42 deletions

File tree

WordPress/src/main/java/org/wordpress/android/ui/accounts/login/ApplicationPasswordLoginHelper.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class ApplicationPasswordLoginHelper @Inject constructor(
4646
private val discoverSuccessWrapper: DiscoverSuccessWrapper,
4747
private val crashLogging: CrashLogging,
4848
private val wpApiClientProvider: WpApiClientProvider,
49-
private val credentialsChangedNotifier: CredentialsChangedNotifier,
5049
) {
5150
private var processedAppPasswordData: String? = null
5251

@@ -149,7 +148,6 @@ class ApplicationPasswordLoginHelper @Inject constructor(
149148
}
150149
wpApiClientProvider.clearSelfHostedClient(site.id)
151150
dispatcherWrapper.updateApplicationPassword(site)
152-
credentialsChangedNotifier.notifyChanged(site.id)
153151
trackSuccessful(effectiveUrlLogin.siteUrl)
154152
trackCreated(creationSource, success = true)
155153
processedAppPasswordData = effectiveUrlLogin.siteUrl

WordPress/src/main/java/org/wordpress/android/ui/accounts/login/CredentialsChangedNotifier.kt

Lines changed: 0 additions & 34 deletions
This file was deleted.

WordPress/src/test/java/org/wordpress/android/ui/accounts/login/ApplicationPasswordLoginHelperTest.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ class ApplicationPasswordLoginHelperTest : BaseUnitTest() {
7676
@Mock
7777
lateinit var wpApiClientProvider: WpApiClientProvider
7878

79-
@Mock
80-
lateinit var credentialsChangedNotifier: CredentialsChangedNotifier
81-
8279
private lateinit var applicationPasswordLoginHelper: ApplicationPasswordLoginHelper
8380

8481
@Before
@@ -95,8 +92,7 @@ class ApplicationPasswordLoginHelperTest : BaseUnitTest() {
9592
apiRootUrlCache,
9693
discoverSuccessWrapper,
9794
crashLogging,
98-
wpApiClientProvider,
99-
credentialsChangedNotifier
95+
wpApiClientProvider
10096
)
10197
}
10298

@@ -210,7 +206,6 @@ class ApplicationPasswordLoginHelperTest : BaseUnitTest() {
210206
verify(siteStore).sites
211207
verify(dispatcherWrapper).updateApplicationPassword(eq(siteModel))
212208
verify(wpApiClientProvider).clearSelfHostedClient(eq(siteModel.id))
213-
verify(credentialsChangedNotifier).notifyChanged(eq(siteModel.id))
214209
}
215210

216211
@Test

0 commit comments

Comments
 (0)