import { AfterContentInit, Component, ContentChildren, EventEmitter, Input, Output, QueryList, TemplateRef } from '@angular/core'
import { ComponentPagination, Notifier, User } from '@app/core'
import { logger } from '@root-helpers/logger'
-import { ResultList, VideoSortField } from '@shared/models'
+import { objectKeysTyped } from '@shared/core-utils'
+import { ResultList, VideosExistInPlaylists, VideoSortField } from '@shared/models'
import { PeerTubeTemplateDirective, Video } from '../shared-main'
import { MiniatureDisplayOptions } from './video-miniature.component'
styleUrls: [ './videos-selection.component.scss' ]
})
export class VideosSelectionComponent implements AfterContentInit {
+ @Input() videosContainedInPlaylists: VideosExistInPlaylists
@Input() user: User
@Input() pagination: ComponentPagination
}
isInSelectionMode () {
- return Object.keys(this._selection).some(k => this._selection[k] === true)
+ return objectKeysTyped(this._selection).some(k => this._selection[k] === true)
}
videoById (index: number, video: Video) {