|
|
@@ -30,6 +30,12 @@ class LNBeanViewController: LNViewController {
|
|
|
|
|
|
updateContent()
|
|
|
}
|
|
|
+
|
|
|
+ override func viewDidAppear(_ animated: Bool) {
|
|
|
+ super.viewDidAppear(animated)
|
|
|
+
|
|
|
+ LNPurchaseManager.shared.reloadWalletInfo()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
extension LNBeanViewController: LNPurchaseManagerNotify {
|
|
|
@@ -76,6 +82,24 @@ extension LNBeanViewController {
|
|
|
make.edges.equalToSuperview()
|
|
|
}
|
|
|
|
|
|
+ if LNConfigManager.shared.isBeanAvailable {
|
|
|
+ let tag = UIImageView()
|
|
|
+ tag.image = switch LNAppConfig.shared.curLang {
|
|
|
+ case .chiness: .icBeanValueBgCn
|
|
|
+ case .english: .icBeanValueBgEn
|
|
|
+ case .indonesian: .icBeanValueBgId
|
|
|
+ }
|
|
|
+ tag.isUserInteractionEnabled = true
|
|
|
+ tag.onTap { [weak self] in
|
|
|
+ guard let self else { return }
|
|
|
+ view.pushToWebView(.init(url: .beanUrl))
|
|
|
+ }
|
|
|
+ container.addSubview(tag)
|
|
|
+ tag.snp.makeConstraints { make in
|
|
|
+ make.top.trailing.equalToSuperview()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
let totalView = UIView()
|
|
|
container.addSubview(totalView)
|
|
|
totalView.snp.makeConstraints { make in
|