show who reposted but keep it hidden for the moment, may rework this more
This commit is contained in:
parent
fe0f12f613
commit
aaaafa18b4
2 changed files with 8 additions and 0 deletions
|
@ -50,6 +50,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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-row>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<button ion-button icon-left clear small block (click)="showReplyPost(post)">
|
<button ion-button icon-left clear small block (click)="showReplyPost(post)">
|
||||||
|
|
|
@ -110,6 +110,11 @@ export class StreamPage {
|
||||||
for (var i = 0; i < res.data.length; i++) {
|
for (var i = 0; i < res.data.length; i++) {
|
||||||
if (res.data[i]['repost_of']) {
|
if (res.data[i]['repost_of']) {
|
||||||
res.data[i] = 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;
|
this.posts = res.data;
|
||||||
|
|
Reference in a new issue