This repository was archived by the owner on Feb 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
fluxc/src/main/java/org/wordpress/android/fluxc/store Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -1341,12 +1341,15 @@ open class SiteStore @Inject constructor(
13411341 }
13421342
13431343 suspend fun fetchSite (site : SiteModel ): OnSiteChanged {
1344- val updatedSite = if (site.isUsingWpComRestApi) {
1345- siteRestClient.fetchSite(site)
1346- } else {
1347- siteXMLRPCClient.fetchSite(site)
1344+ return coroutineEngine.withDefaultContext(T .API , this , " Fetch site" ) {
1345+ val updatedSite = if (site.isUsingWpComRestApi) {
1346+ siteRestClient.fetchSite(site)
1347+ } else {
1348+ siteXMLRPCClient.fetchSite(site)
1349+ }
1350+
1351+ updateSite(updatedSite)
13481352 }
1349- return updateSite(updatedSite)
13501353 }
13511354
13521355 suspend fun fetchSites (payload : FetchSitesPayload ): OnSiteChanged {
@@ -1357,7 +1360,9 @@ open class SiteStore @Inject constructor(
13571360 }
13581361
13591362 suspend fun fetchSitesXmlRpc (payload : RefreshSitesXMLRPCPayload ): OnSiteChanged {
1360- return updateSites(siteXMLRPCClient.fetchSites(payload.url, payload.username, payload.password))
1363+ return coroutineEngine.withDefaultContext(T .API , this , " Fetch sites" ) {
1364+ updateSites(siteXMLRPCClient.fetchSites(payload.url, payload.username, payload.password))
1365+ }
13611366 }
13621367
13631368 @Suppress(" ForbiddenComment" , " SwallowedException" )
You can’t perform that action at this time.
0 commit comments