mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-17 14:21:14 +00:00
[ACA-1769] Favorites - refresh after unfavoriting an item (#609)
* favorite toggle action event * subscribe favorite view to toggle favorite event * emit event on toggle favorite
This commit is contained in:
committed by
Denys Vuika
parent
1be7c0fd20
commit
7ac613d72c
@@ -23,12 +23,13 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, ChangeDetectorRef } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppStore } from '../../../store/states';
|
||||
import { appSelection } from '../../../store/selectors/app.selectors';
|
||||
import { Observable } from 'rxjs';
|
||||
import { SelectionState } from '@alfresco/adf-extensions';
|
||||
import { ContentManagementService } from '../../../services/content-management.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-toggle-favorite',
|
||||
@@ -50,12 +51,11 @@ export class ToggleFavoriteComponent {
|
||||
|
||||
constructor(
|
||||
private store: Store<AppStore>,
|
||||
private changeDetection: ChangeDetectorRef) {
|
||||
|
||||
private content: ContentManagementService) {
|
||||
this.selection$ = this.store.select(appSelection);
|
||||
}
|
||||
|
||||
onToggleEvent() {
|
||||
this.changeDetection.detectChanges();
|
||||
this.content.favoriteToggle.next();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user