File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
WooCommerce/src/main/kotlin/com/woocommerce/android/tools Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -87,18 +87,18 @@ class SelectedSite @Inject constructor(
8787 @Suppress(" DEPRECATION" )
8888 @Synchronized
8989 fun set (siteModel : SiteModel ) {
90+ // Create a new site component tied to the lifecycle of the selected site
91+ siteComponent = siteComponentProvider.get()
92+ .setSite(siteModel)
93+ .setCoroutineScope(createSiteCoroutineScope())
94+ .build()
95+
9096 wasReset = false
9197 state.value = siteModel
9298 PreferenceUtils .setInt(getPreferences(), SELECTED_SITE_LOCAL_ID , siteModel.id)
9399
94100 // Notify listeners
95101 getEventBus().post(SelectedSiteChangedEvent (siteModel))
96-
97- // Create a new site component tied to the lifecycle of the selected site
98- siteComponent = siteComponentProvider.get()
99- .setSite(get())
100- .setCoroutineScope(createSiteCoroutineScope())
101- .build()
102102 }
103103
104104 @Synchronized
You can’t perform that action at this time.
0 commit comments