diff --git a/UnstoppableWallet/UnstoppableWallet/Core/Managers/AppManager.swift b/UnstoppableWallet/UnstoppableWallet/Core/Managers/AppManager.swift index ce438cf3cb..d1aa4aed19 100644 --- a/UnstoppableWallet/UnstoppableWallet/Core/Managers/AppManager.swift +++ b/UnstoppableWallet/UnstoppableWallet/Core/Managers/AppManager.swift @@ -1,6 +1,7 @@ import Foundation import RxSwift import UIKit +import WidgetKit class AppManager { private let accountManager: AccountManager @@ -108,6 +109,8 @@ extension AppManager { walletConnectSocketConnectionService.willEnterForeground() nftMetadataSyncer.sync() + + AppWidgetConstants.allKinds.forEach { WidgetCenter.shared.reloadTimelines(ofKind: $0) } } func willTerminate() { diff --git a/UnstoppableWallet/Widget/AppWidgetConstants.swift b/UnstoppableWallet/Widget/AppWidgetConstants.swift index 5fe71776b2..b5ad23b417 100644 --- a/UnstoppableWallet/Widget/AppWidgetConstants.swift +++ b/UnstoppableWallet/Widget/AppWidgetConstants.swift @@ -1,4 +1,6 @@ enum AppWidgetConstants { + static let allKinds = [singleCoinPriceWidgetKind, topCoinsWidgetKind, watchlistWidgetKind] + static let singleCoinPriceWidgetKind: String = "io.horizontalsystems.unstoppable.SingleCoinPriceWidget" static let topCoinsWidgetKind: String = "io.horizontalsystems.unstoppable.TopCoinsWidget" static let watchlistWidgetKind: String = "io.horizontalsystems.unstoppable.WatchlistWidget"