Skip to content
Snippets Groups Projects
Commit 87873acf authored by Diego Rodríguez's avatar Diego Rodríguez
Browse files

Fix file name bug not renewing when loading new document

parent 91d5b665
No related branches found
No related tags found
1 merge request!11Dja share files
......@@ -431,14 +431,6 @@ export class MateFunComponent implements OnInit, OnChanges {
this.translateService = this.translate;
this.titlecasePipe = new TitleCasePipe();
//si el archivo fue seteado en la session.
this.archivo = this.sessionService.getArchivo();
if (!this.archivo || !this.archivo.id) {
this.newFile();
}
this.copiaContenidoArchivo = this.archivo.contenido;
this.copiaNombreArchivo = this.archivo.nombre;
if (this.authService.getUser().editor_configuration) {
var config: Configuracion =
this.userService.editorConfigurationToConfiguracion(
......@@ -467,8 +459,16 @@ export class MateFunComponent implements OnInit, OnChanges {
// This was always on ngOnInit
if (!!this.route.snapshot.paramMap.get("id")) {
this.getCurrentDocument();
this.getCurrentDocument(() => {
this.copiaContenidoArchivo = this.archivo.contenido;
this.copiaNombreArchivo = this.archivo.nombre;
});
} else {
this.newFile();
this.copiaContenidoArchivo = this.archivo.contenido;
this.copiaNombreArchivo = this.archivo.nombre;
}
this.router.events
.pipe(filter((e) => e instanceof NavigationEnd))
.subscribe((_) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment