import { SortMeta } from 'primeng/api'
import { Component, OnInit, ViewChild } from '@angular/core'
import { Notifier, RestPagination, RestTable } from '@app/core'
-import { Account, Actor, VideoOwnershipService } from '@app/shared/shared-main'
+import { Account, VideoOwnershipService } from '@app/shared/shared-main'
import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '@shared/models'
import { MyAcceptOwnershipComponent } from './my-accept-ownership/my-accept-ownership.component'
}
}
- switchToDefaultAvatar ($event: Event) {
- ($event.target as HTMLImageElement).src = Actor.GET_DEFAULT_AVATAR_URL()
- }
-
openAcceptModal (videoChangeOwnership: VideoChangeOwnership) {
this.myAccountAcceptOwnershipComponent.show(videoChangeOwnership)
}
accepted () {
- this.loadData()
+ this.reloadData()
}
refuse (videoChangeOwnership: VideoChangeOwnership) {
this.videoOwnershipService.refuseOwnership(videoChangeOwnership.id)
.subscribe(
- () => this.loadData(),
+ () => this.reloadData(),
err => this.notifier.error(err.message)
)
}
- protected loadData () {
+ protected reloadData () {
return this.videoOwnershipService.getOwnershipChanges(this.pagination, this.sort)
.subscribe(
resultList => {