Ensure stats get updated in realtime on action bars

Changelog-Fixed: Ensure stats get updated in realtime on action bars
This commit is contained in:
William Casarin
2023-02-14 10:05:59 -08:00
parent 6d634763c5
commit 59211bb4fd
5 changed files with 13 additions and 21 deletions

View File

@@ -98,8 +98,8 @@ extension Notification.Name {
static var deleted_account: Notification.Name {
return Notification.Name("deleted_account")
}
static var new_zap: Notification.Name {
return Notification.Name("new_zap")
static var update_stats: Notification.Name {
return Notification.Name("update_stats")
}
}

View File

@@ -60,7 +60,7 @@ class Zaps {
event_counts[id] = event_counts[id]! + 1
event_totals[id] = event_totals[id]! + zap.invoice.amount
notify(.new_zap, zap)
notify(.update_stats, zap.target.id)
return
}