show who reposted but keep it hidden for the moment, may rework this more

This commit is contained in:
Morgan McMillian 2017-06-25 10:52:26 -07:00
parent fe0f12f613
commit aaaafa18b4
2 changed files with 8 additions and 0 deletions

View file

@ -50,6 +50,9 @@
</div>
</div>
</div>
<div *ngIf="post.reposted_by_string">
<ion-item><ion-note>{{ post.reposted_by_string }}</ion-note></ion-item>
</div>
<ion-row>
<ion-col>
<button ion-button icon-left clear small block (click)="showReplyPost(post)">

View file

@ -110,6 +110,11 @@ export class StreamPage {
for (var i = 0; i < res.data.length; i++) {
if (res.data[i]['repost_of']) {
res.data[i] = res.data[i]['repost_of']
var reposted_by_string = "";
for (var j = 0; j < res.data[i]['reposted_by'].length; j++) {
reposted_by_string = reposted_by_string + res.data[i]['reposted_by'][j]['username'] + ", ";
}
// res.data[i]['reposted_by_string'] = "Reposted by: " + reposted_by_string;
}
}
this.posts = res.data;