don't show thread/reply labels in thread display

This commit is contained in:
Nicolas Constant 2019-03-09 01:17:52 -05:00
parent 8d4111aea6
commit 1cb656c40c
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
4 changed files with 9 additions and 1 deletions

View File

@ -25,6 +25,8 @@ export class StatusComponent implements OnInit {
@Output() browseThreadEvent = new EventEmitter<OpenThreadEvent>();
@ViewChild('appActionBar') appActionBar: ActionBarComponent;
@Input() isThreadDisplay: boolean;
private _statusWrapper: StatusWrapper;
status: Status;
@Input('statusWrapper')
@ -90,6 +92,8 @@ export class StatusComponent implements OnInit {
}
}
if(this.isThreadDisplay) return;
if (status.in_reply_to_account_id && status.in_reply_to_account_id === status.account.id) {
this.isThread = true;
}

View File

@ -3,7 +3,9 @@
<!-- data-simplebar -->
<div class="stream-toots__status" *ngFor="let statusWrapper of statuses">
<app-status [statusWrapper]="statusWrapper"
<app-status
[statusWrapper]="statusWrapper"
[isThreadDisplay]="isThread"
(browseAccountEvent)="browseAccount($event)"
(browseHashtagEvent)="browseHashtag($event)"
(browseThreadEvent)="browseThread($event)"></app-status>

View File

@ -19,6 +19,7 @@ import { StatusWrapper } from '../../../models/common.model';
})
export class StreamStatusesComponent implements OnInit, OnDestroy {
isLoading = true;
isThread = false;
displayError: string;
private _streamElement: StreamElement;

View File

@ -17,6 +17,7 @@ export class ThreadComponent implements OnInit {
statuses: StatusWrapper[] = [];
displayError: string;
isLoading = true;
isThread = true;
private lastThreadEvent: OpenThreadEvent;