]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
Reorder playlists when adding an element
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-actor-image-edit / actor-avatar-edit.component.ts
index 8b7d64ed33ccebbf204dbd7568a440cbbc2a8b0f..b71a3c485b3daa53d1e890e435cae490443aff73 100644 (file)
@@ -72,22 +72,12 @@ export class ActorAvatarEditComponent implements OnInit {
   }
 
   hasAvatar () {
-    return !!this.preview || !!this.actor.avatar
+    return !!this.preview || this.actor.avatars.length !== 0
   }
 
-  isChannel () {
-    return !!(this.actor as VideoChannel).ownerAccount
-  }
-
-  getChannel (): VideoChannel {
-    if (this.isChannel()) return this.actor as VideoChannel
-
-    return undefined
-  }
-
-  getAccount (): Account {
-    if (this.isChannel()) return undefined
+  getActorType () {
+    if ((this.actor as VideoChannel).ownerAccount) return 'channel'
 
-    return this.actor as Account
+    return 'account'
   }
 }