Skip to content

Commit 586a357

Browse files
Remove old way for checking for app passwords support
1 parent 3e845a0 commit 586a357

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

libs/fluxc-plugin/src/main/kotlin/org/wordpress/android/fluxc/store/WooCommerceStore.kt

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import org.wordpress.android.fluxc.persistence.entity.WCSettingsModel
4141
import org.wordpress.android.fluxc.store.SiteStore.FetchSitesPayload
4242
import org.wordpress.android.fluxc.store.SiteStore.OnSiteChanged
4343
import org.wordpress.android.fluxc.tools.CoroutineEngine
44-
import org.wordpress.android.fluxc.utils.PreferenceUtils
4544
import org.wordpress.android.fluxc.utils.WCCurrencyUtils
4645
import org.wordpress.android.util.AppLog
4746
import org.wordpress.android.util.AppLog.T
@@ -109,23 +108,6 @@ open class WooCommerceStore @Inject internal constructor(
109108

110109
@Suppress("ReturnCount")
111110
suspend fun fetchWooCommerceSite(site: SiteModel): WooResult<SiteModel> {
112-
// Check if the site supports application passwords or not
113-
// TODO remove this check after finishing the application passwords experiment
114-
suspend fun fetchAppPasswordsSupportIfNeeded(site: SiteModel) {
115-
val sharedPrefs = PreferenceUtils.getFluxCPreferences(appContext)
116-
val sharedPrefKey = "application_passwords_check_done"
117-
val checkDone = sharedPrefs.getBoolean(sharedPrefKey, false)
118-
if (site.applicationPasswordsAuthorizeUrl != null || checkDone) return
119-
120-
fetchSupportedApiVersion(site, false).let {
121-
if (!it.isError) {
122-
sharedPrefs.edit()
123-
.putBoolean(sharedPrefKey, true)
124-
.apply()
125-
}
126-
}
127-
}
128-
129111
val fetchResult = siteStore.fetchSite(site)
130112

131113
val updatedSite = withContext(Dispatchers.IO) {
@@ -142,8 +124,6 @@ open class WooCommerceStore @Inject internal constructor(
142124
emitChange(OnSiteChanged(1, listOf(updatedSite)))
143125
}
144126

145-
fetchAppPasswordsSupportIfNeeded(updatedSite)
146-
147127
return WooResult(updatedSite)
148128
}
149129

0 commit comments

Comments
 (0)