change publication like instagram and add time zone to agenda

This commit is contained in:
Peter Maquiran
2023-09-26 10:29:29 +01:00
parent c0eee0e2b3
commit f042168e2e
22 changed files with 305 additions and 113 deletions
@@ -125,10 +125,10 @@ export class ViewPublicationsPage implements OnInit {
this.showLoader = true;
const folderId = this.folderId
try {
const publicationIds = await this.publications.GetPublicationsList(folderId).toPromise();
this.createPublicationList(folderId)
let loadLater = []
for (let publicationId of publicationIds) {
@@ -147,17 +147,17 @@ export class ViewPublicationsPage implements OnInit {
for(let localPublication of this.publicationFolderService.publicationList[folderId]) {
const apiPublication = publicationIds.includes(localPublication.DocumentId)
if(!apiPublication) {
this.publicationFolderService.deletePost(folderId, localPublication.DocumentId)
}
}
this.showLoader = false;
this.storage.set(folderId, this.publicationFolderService.publicationList[folderId]);
this.oldpublicationIds = publicationIds
} catch(error) {
this.showLoader = false;
@@ -166,10 +166,8 @@ export class ViewPublicationsPage implements OnInit {
}
_deletePublication = (folderId, publicationId) => {
this.publicationFolderService.publicationList[folderId] = this.publicationFolderService.publicationList[folderId].filter( e => e.DocumentId != publicationId)
console.log('this.publicationFolderService.publicationList[folderId]', this.publicationFolderService.publicationList[folderId].length)
}
@@ -186,7 +184,7 @@ export class ViewPublicationsPage implements OnInit {
async loadPublication(publicationId, folderId) {
let Publication = await this.publications.GetPublicationById(publicationId).toPromise();
let publicationDetails: Publication = this.publicationPipe.itemList(Publication)
const findIndex = this.publicationFindIndex(publicationId, folderId)
const found = this.publicationIsPresent(publicationId, folderId)
if(!found) {
@@ -194,7 +192,7 @@ export class ViewPublicationsPage implements OnInit {
} else {
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
}
}
getFromDB() {
@@ -242,7 +240,7 @@ export class ViewPublicationsPage implements OnInit {
cssClass: 'new-action modal modal-desktop',
backdropDismiss: true
});
modal.onDidDismiss().then(() => {
// Do nothing
});