mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
fix go back
This commit is contained in:
@@ -18,6 +18,7 @@ import { NewPublicationPage } from './new-publication/new-publication.page';
|
||||
import { ChunkService } from 'src/app/services/stream/chunk.service'
|
||||
import { StreamService } from 'src/app/services/stream/stream.service'
|
||||
import { HttpClient, HttpHeaders, HttpEventType } from '@angular/common/http';
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||
|
||||
// import { ActionModel } from 'src/app/models/beast-orm';
|
||||
|
||||
@@ -77,6 +78,7 @@ export class PublicationsPage implements OnInit {
|
||||
private ChunkService: ChunkService,
|
||||
private StreamService:StreamService,
|
||||
private http: HttpClient,
|
||||
public publicationFolderService: PublicationFolderService,
|
||||
|
||||
|
||||
) {
|
||||
@@ -86,19 +88,21 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
console.log('shared recived', this.intent)
|
||||
|
||||
window['goToPublicationsList'] = this.goToPublicationsList
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
checkQueryParameter() {
|
||||
var urlSearchParams = new URLSearchParams(window.location.search);
|
||||
var folderId = urlSearchParams.get('folderId');
|
||||
// var urlSearchParams = new URLSearchParams(window.location.search);
|
||||
|
||||
if (folderId !== null && window["openFolder"]) {
|
||||
window["openFolder"] = false
|
||||
// var folderId = urlSearchParams.get('folderId');
|
||||
if (this.publicationFolderService.gotoAction) {
|
||||
const folderId = this.publicationFolderService.gotoAction
|
||||
this.goToPublicationsList(folderId)
|
||||
this.publicationFolderService.gotoAction = false
|
||||
} else {
|
||||
console.log('Folder ID::', folderId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +114,7 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url == pathname) {
|
||||
console.log('=================', this.publicationFolderService.gotoAction)
|
||||
this.getActions();
|
||||
this.checkQueryParameter()
|
||||
}
|
||||
@@ -377,11 +382,13 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.doRefresh(event);
|
||||
this.checkQueryParameter();
|
||||
});
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
goToPublicationsList(folderId: string) {
|
||||
goToPublicationsList = (folderId: string) => {
|
||||
console.log('nice', folderId)
|
||||
if(window["sharedContent"]){
|
||||
this.AddPublication('2',folderId,window["sharedContent"])
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user