Skip to content

Commit adb3763

Browse files
committed
Update widgets dependencies on logout
1 parent 1386d20 commit adb3763

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

WooCommerce/Classes/Yosemite/DefaultStoresManager.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ class DefaultStoresManager: StoresManager {
175175
ServiceLocator.storageManager.reset()
176176
ServiceLocator.productImageUploader.reset()
177177

178+
updateAndReloadWidgetInformation(with: 0)
179+
178180
NotificationCenter.default.post(name: .logOutEventReceived, object: nil)
179181

180182
return self
@@ -501,7 +503,7 @@ private extension DefaultStoresManager {
501503
/// Updates the necesary dependencies for the widget to function correctly.
502504
/// Reloads widgets timelines.
503505
///
504-
func updateAndReloadWidgetInformation(with siteID: Int64) {
506+
func updateAndReloadWidgetInformation(with siteID: Int64?) {
505507
// Token to fire network requests
506508
keychain.currentAuthToken = sessionManager.defaultCredentials?.authToken
507509

0 commit comments

Comments
 (0)