refactor(reminders): cleanup

This commit is contained in:
Johannes Millan 2018-11-25 23:14:34 +01:00
parent 10fb83e644
commit 2d31dfc29c
2 changed files with 3 additions and 11 deletions

View file

@ -10,8 +10,7 @@
[@warpRoute]="getPage(o)">
<router-outlet #o="outlet"></router-outlet>
</div>
<mat-drawer #drawer
(closedStart)="noteService.hide()"
<mat-drawer (closedStart)="noteService.hide()"
[mode]="mobileQuery.matches ? 'over' : 'side'"
[opened]="noteService.isShowNotes$|async"
position="end">

View file

@ -1,10 +1,8 @@
import { ChangeDetectionStrategy, Component, Input, OnInit, ViewChild } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, ViewChild } from '@angular/core';
import { Note } from '../note.model';
import { NoteService } from '../note.service';
import { MatDialog } from '@angular/material';
import { DialogAddNoteReminderComponent } from '../dialog-add-note-reminder/dialog-add-note-reminder.component';
import { ReminderService } from '../../reminder/reminder.service';
import { SnackService } from '../../core/snack/snack.service';
@Component({
selector: 'note',
@ -12,7 +10,7 @@ import { SnackService } from '../../core/snack/snack.service';
styleUrls: ['./note.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class NoteComponent implements OnInit {
export class NoteComponent {
@Input() note: Note;
@Input() isFocus: boolean;
@ -21,14 +19,9 @@ export class NoteComponent implements OnInit {
constructor(
private readonly _matDialog: MatDialog,
private readonly _noteService: NoteService,
private readonly _snackService: SnackService,
private readonly _reminderService: ReminderService,
) {
}
ngOnInit() {
}
toggleLock() {
this._noteService.update(this.note.id, {isLock: !this.note.isLock});
}