Skip to content

Commit

Permalink
fix subscription header not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-luger committed Sep 2, 2024
1 parent 94cf6e1 commit 277a626
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions components/SubscriptionList/SubscriptionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,18 @@ function SubscriptionList() {
return
}

let newListeners = [...listener]
let newListeners = [...listeners]

listeners.forEach((listener, i) => {
getSubscriptionTitle(listener).then(title => {
let promises: Promise<void>[] = []
newListeners.forEach((listener, i) => {
let p = getSubscriptionTitle(listener).then(title => {
newListeners[i].title = title
})
promises.push(p)
})
Promise.all(promises).then(() => {
setListener(newListeners)
})
setListener(listeners)
})
}

Expand Down

0 comments on commit 277a626

Please sign in to comment.