adding dependencies for API wirering

This commit is contained in:
Nicolas Constant 2018-10-02 00:19:11 -04:00
parent 630dbf2f76
commit fa75e81685
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 16 additions and 2 deletions

View File

@ -1,5 +1,9 @@
import { Component, OnInit, Input } from '@angular/core';
import { Store } from '@ngxs/store';
import { StatusWrapper } from '../../stream.component';
import { MastodonService } from '../../../../services/mastodon.service';
import { AccountInfo } from '../../../../states/accounts.state';
@Component({
selector: 'app-action-bar',
@ -11,10 +15,15 @@ export class ActionBarComponent implements OnInit {
isFavorited: boolean;
isBoosted: boolean;
isBoostLocked: boolean;
isLocked: boolean;
constructor() { }
constructor(
private readonly store: Store,
private readonly mastodonService: MastodonService) { }
ngOnInit() {
ngOnInit() {
}
reply(): boolean {
@ -38,4 +47,9 @@ export class ActionBarComponent implements OnInit {
console.warn('more');
return false;
}
private getSelectedAccounts(): AccountInfo[] {
var regAccounts = <AccountInfo[]>this.store.snapshot().registeredaccounts.accounts;
return regAccounts.filter(x => x.isSelected);
}
}