fix the issue about project name set private/pubulic alert problem

This commit is contained in:
pengpengshui 2017-07-14 10:57:06 -07:00
parent 8ec00c479e
commit 900837326a

View File

@ -124,7 +124,6 @@ export class ProjectComponent implements OnInit, OnDestroy {
getProjects(name?: string, isPublic?: number, page?: number, pageSize?: number): void {
this.loading = true;
this.projectService
.listProjects(name, isPublic, page, pageSize)
.subscribe(
@ -184,7 +183,11 @@ export class ProjectComponent implements OnInit, OnDestroy {
response => {
this.messageHandlerService.showSuccess('PROJECT.TOGGLED_SUCCESS');
this.statisticHandler.refresh();
this.getProjects("", this.currentFilteredType - 1);
if (this.currentFilteredType === 0) {
this.getProjects();
} else {
this.getProjects("", this.currentFilteredType - 1);
}
},
error => this.messageHandlerService.handleError(error)
);