fix agenda layout and publication stop playing video on scroll

This commit is contained in:
Peter Maquiran
2023-12-04 08:34:57 +01:00
parent 1bd3d5a9f2
commit e8c740ef6a
6 changed files with 78 additions and 40 deletions
-2
View File
@@ -508,7 +508,6 @@ div ion-raw > ul > li {
font-family: Roboto;
font-weight: bold;
color: var(--title-text-color);
max-width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -519,7 +518,6 @@ div ion-raw > ul > li {
overflow: hidden !important;
text-overflow: ellipsis !important;
font-size: rem(17);
max-width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -68,8 +68,6 @@ export class ViewPublicationsPage implements OnInit {
private publicationVideoManagerService: PublicationVideoManagerService) {
this.publicationVideoManagerService.setContainer(this.VideoManager.nativeElement)
this.createPublicationList()
this.getFromDB();
@@ -233,10 +231,28 @@ export class ViewPublicationsPage implements OnInit {
const findIndex = this.publicationFindIndex(publicationId, folderId)
const found = this.publicationIsPresent(publicationId, folderId)
if (!found) {
this.publicationFolderService.publicationList[folderId].push(publicationDetails)
} else {
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
let a: any = Object.assign({},this.publicationFolderService.publicationList[folderId][findIndex])
let b: any = Object.assign({}, publicationDetails)
a.Files = a.Files.length
b.Files = b.Files.length
if(JSON.stringify(a) != JSON.stringify(b)) {
// console.log({a, b})
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
} else {
// console.log({publicationDetails})
}
}
}
@@ -23,7 +23,6 @@ export class PublicationVideoManagerService {
}
class SelectedPublication {
position: number
video: HTMLVideoElement
@@ -28,14 +28,14 @@
</div>
</ion-header>
<ion-content [scrollEvents]="true" (ionScroll)="onScroll($event)">
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
<div class="main-container px-20" *ngIf="publicationFolderService.FolderDetails[folderId]" class="VideoManager" #VideoManager>
<div class="main-container px-20" *ngIf="publicationFolderService.FolderDetails[folderId]">
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
@@ -60,12 +60,6 @@ export class ViewPublicationsPage implements OnInit {
private publicationVideoManagerService: PublicationVideoManagerService
) {
setTimeout(()=> {
// console.log("this.VideoManager", this.VideoManager, document.querySelector('.VideoManager'))
this.publicationVideoManagerService.setContainer(this.VideoManager.nativeElement)
}, 2000)
// this.publicationVideoManagerService.setContainer(this.VideoManager.nativeElement)
this.createPublicationList()
}
@@ -75,7 +69,7 @@ export class ViewPublicationsPage implements OnInit {
console.log("nice to have", e)
if(!e) {
this.stopVideo()
//this.stopVideo()
}
}
ngOnInit() {
@@ -217,10 +211,27 @@ export class ViewPublicationsPage implements OnInit {
const findIndex = this.publicationFindIndex(publicationId, folderId)
const found = this.publicationIsPresent(publicationId, folderId)
if (!found) {
this.publicationFolderService.publicationList[folderId].push(publicationDetails)
} else {
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
// console.log("names");
let a: any = Object.assign({},this.publicationFolderService.publicationList[folderId][findIndex])
let b: any = Object.assign({}, publicationDetails)
a.Files = a.Files.length
b.Files = b.Files.length
if(JSON.stringify(a) != JSON.stringify(b)) {
// console.log({a, b})
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
} else {
// console.log({publicationDetails})
}
}
}
+15 -1
View File
@@ -150,7 +150,21 @@ export class PublicationFolderService {
if(!found) {
this.publicationList[folderId].push(publicationDetails)
} else {
this.publicationList[folderId][findIndex] = publicationDetails
let a: any = Object.assign({},this.publicationList[folderId][findIndex])
let b: any = Object.assign({}, publicationDetails)
a.Files = a.Files.length
b.Files = b.Files.length
if(JSON.stringify(a) != JSON.stringify(b)) {
// console.log({a, b})
this.publicationList[folderId][findIndex] = publicationDetails
} else {
// console.log({publicationDetails})
}
}
}