Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jacobsapps/8d4da6e1785a9244d97cc908222de702 to your computer and use it in GitHub Desktop.
Save jacobsapps/8d4da6e1785a9244d97cc908222de702 to your computer and use it in GitHub Desktop.
@MainActor
private func streamNotificationCount() async {
for await notificationsCount in combineLatest(
repo.chatNotificationsSequence,
repo.friendNotificationsSequence
).map({
$0.0.count + $0.1.count
}) {
self.notificationCount = notificationsCount
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment