aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/helpers/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/helpers/utils.ts')
-rw-r--r--client/src/app/helpers/utils.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/src/app/helpers/utils.ts b/client/src/app/helpers/utils.ts
index 825b6ca96..aa37fdd46 100644
--- a/client/src/app/helpers/utils.ts
+++ b/client/src/app/helpers/utils.ts
@@ -16,7 +16,10 @@ function getParameterByName (name: string, url: string) {
16 return decodeURIComponent(results[2].replace(/\+/g, ' ')) 16 return decodeURIComponent(results[2].replace(/\+/g, ' '))
17} 17}
18 18
19function populateAsyncUserVideoChannels (authService: AuthService, channel: { id: number, label: string, support?: string }[]) { 19function populateAsyncUserVideoChannels (
20 authService: AuthService,
21 channel: { id: number, label: string, support?: string, avatarPath?: string, recent?: boolean }[]
22) {
20 return new Promise(res => { 23 return new Promise(res => {
21 authService.userInformationLoaded 24 authService.userInformationLoaded
22 .subscribe( 25 .subscribe(
@@ -27,7 +30,12 @@ function populateAsyncUserVideoChannels (authService: AuthService, channel: { id
27 const videoChannels = user.videoChannels 30 const videoChannels = user.videoChannels
28 if (Array.isArray(videoChannels) === false) return 31 if (Array.isArray(videoChannels) === false) return
29 32
30 videoChannels.forEach(c => channel.push({ id: c.id, label: c.displayName, support: c.support })) 33 videoChannels.forEach(c => channel.push({
34 id: c.id,
35 label: c.displayName,
36 support: c.support,
37 avatarPath: c.avatar?.path
38 }))
31 39
32 return res() 40 return res()
33 } 41 }