5f9477d55b
Previously, if the user had the DamusPurpleView open and bought the subscription, the DamusPurpleView would not change. It would stay in the marketing pitch screen. This commit makes sure that this view is automatically updated as soon as the user sees the welcome screen, so that they can see their account info in case they have DamusPurpleView open. Testing -------- PASS iOS: 17.2 Damus: This commit damus-api: Varying versions around `9a6af62` Coverage: 1. Checked the entire LN flow through the local test environment using the simulator 2. Checked all LN flow views on both light and dark mode to ensure it looks good 3. Checked the entire LN flow using the staging environment using a physical iOS device Closes: https://github.com/damus-io/damus/issues/1899 Signed-off-by: Daniel D’Aquino <daniel@daquino.me> Reviewed-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb55.com>
26 lines
569 B
Swift
26 lines
569 B
Swift
//
|
||
// PurpleAccountUpdateNotify.swift
|
||
// damus
|
||
//
|
||
// Created by Daniel D’Aquino on 2024-01-29.
|
||
//
|
||
|
||
import Foundation
|
||
|
||
struct PurpleAccountUpdateNotify: Notify {
|
||
typealias Payload = DamusPurple.Account
|
||
var payload: DamusPurple.Account
|
||
}
|
||
|
||
extension NotifyHandler {
|
||
static var purple_account_update: NotifyHandler<PurpleAccountUpdateNotify> {
|
||
.init()
|
||
}
|
||
}
|
||
|
||
extension Notifications {
|
||
static func purple_account_update(_ result: DamusPurple.Account) -> Notifications<PurpleAccountUpdateNotify> {
|
||
.init(.init(payload: result))
|
||
}
|
||
}
|