fix opening thread from status in search
This commit is contained in:
parent
2f463f74f5
commit
27d455c4af
|
@ -1,7 +1,8 @@
|
|||
<div class="floating-column">
|
||||
<app-stream-overlay class="stream-overlay" *ngIf="overlayActive" (closeOverlay)="closeOverlay()"
|
||||
[browseAccountData]="overlayAccountToBrowse"
|
||||
[browseHashtagData]="overlayHashtagToBrowse"></app-stream-overlay>
|
||||
[browseHashtagData]="overlayHashtagToBrowse"
|
||||
[browseThreadData]="overlayThreadToBrowse"></app-stream-overlay>
|
||||
|
||||
<div class="floating-column__header">
|
||||
<a class="close-button" href (click)="closePanel()" title="close">x</a>
|
||||
|
@ -12,6 +13,7 @@
|
|||
<app-add-new-account *ngIf="openPanel === 'addNewAccount'"></app-add-new-account>
|
||||
<app-search *ngIf="openPanel === 'search'"
|
||||
(browseAccountEvent)="browseAccount($event)"
|
||||
(browseHashtagEvent)="browseHashtag($event)"></app-search>
|
||||
(browseHashtagEvent)="browseHashtag($event)"
|
||||
(browseThreadEvent)="browseThread($event)"></app-search>
|
||||
<app-settings *ngIf="openPanel === 'settings'"></app-settings>
|
||||
</div>
|
|
@ -1,6 +1,7 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { NavigationService, LeftPanelType } from '../../services/navigation.service';
|
||||
import { AccountWrapper } from '../../models/account.models';
|
||||
import { OpenThreadEvent } from '../../services/tools.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-floating-column',
|
||||
|
@ -11,6 +12,7 @@ export class FloatingColumnComponent implements OnInit {
|
|||
overlayActive: boolean;
|
||||
overlayAccountToBrowse: string;
|
||||
overlayHashtagToBrowse: string;
|
||||
overlayThreadToBrowse: OpenThreadEvent;
|
||||
|
||||
userAccountUsed: AccountWrapper;
|
||||
|
||||
|
@ -54,18 +56,22 @@ export class FloatingColumnComponent implements OnInit {
|
|||
browseAccount(account: string): void {
|
||||
this.overlayAccountToBrowse = account;
|
||||
this.overlayHashtagToBrowse = null;
|
||||
this.overlayThreadToBrowse = null;
|
||||
this.overlayActive = true;
|
||||
}
|
||||
|
||||
browseHashtag(hashtag: string): void {
|
||||
this.overlayAccountToBrowse = null;
|
||||
this.overlayHashtagToBrowse = hashtag;
|
||||
this.overlayThreadToBrowse = null;
|
||||
this.overlayActive = true;
|
||||
}
|
||||
|
||||
browseThread(thread: string): void {
|
||||
console.warn('browseThread'); //TODO
|
||||
console.warn(thread);
|
||||
browseThread(openThreadEvent: OpenThreadEvent): void {
|
||||
this.overlayAccountToBrowse = null;
|
||||
this.overlayHashtagToBrowse = null;
|
||||
this.overlayThreadToBrowse = openThreadEvent;
|
||||
this.overlayActive = true;
|
||||
}
|
||||
|
||||
closeOverlay(): boolean {
|
||||
|
|
|
@ -47,14 +47,12 @@ export class SearchComponent implements OnInit {
|
|||
return false;
|
||||
}
|
||||
|
||||
// addHashtag(hashtag: string): boolean {
|
||||
// if (hashtag) {
|
||||
// const newStream = new StreamElement(StreamTypeEnum.tag, `#${hashtag}`, this.lastAccountUsed.id, hashtag, null);
|
||||
// this.store.dispatch([new AddStream(newStream)]);
|
||||
// }
|
||||
|
||||
// return false;
|
||||
// }
|
||||
browseThread(openThreadEvent: OpenThreadEvent): boolean{
|
||||
if(openThreadEvent){
|
||||
this.browseThreadEvent.next(openThreadEvent);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
browseAccount(accountName: string): boolean {
|
||||
if (accountName) {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<div class="stream-column">
|
||||
|
||||
<app-stream-overlay class="stream-overlay" *ngIf="overlayActive" (closeOverlay)="closeOverlay()"
|
||||
[browseAccountData]="overlayAccountToBrowse" [browseHashtagData]="overlayHashtagToBrowse" [browseThreadData]="overlayThreadToBrowse"></app-stream-overlay>
|
||||
[browseAccountData]="overlayAccountToBrowse"
|
||||
[browseHashtagData]="overlayHashtagToBrowse"
|
||||
[browseThreadData]="overlayThreadToBrowse"></app-stream-overlay>
|
||||
|
||||
<div class="stream-column__stream-header">
|
||||
<a class="stream-column__open-menu" href title="edit column" (click)="openEditionMenu()">
|
||||
|
|
Loading…
Reference in New Issue