From d1b1113857c77928014a2ff6052ef6b0f9773e2e Mon Sep 17 00:00:00 2001 From: otofune <otofune@gmail.com> Date: Wed, 1 Mar 2017 00:54:02 +0000 Subject: [PATCH] [client] entrance -> public timeline: show processed posts (WIP) TODO * use nested tag for rendering correctly --- src/web/app/common/tags/public-timeline.tag | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/web/app/common/tags/public-timeline.tag b/src/web/app/common/tags/public-timeline.tag index 1bc18e5a8..65fe27f55 100644 --- a/src/web/app/common/tags/public-timeline.tag +++ b/src/web/app/common/tags/public-timeline.tag @@ -60,6 +60,7 @@ </style> <script> this.mixin('api'); + this.mixin('text') this.posts = []; this.isFetching = true; @@ -69,7 +70,12 @@ limit: 5, include_reposts: false, include_replies: false - }).then(posts => { + }).then(data => { + const posts = data.map(datum => { + const tokens = this.analyze(datum.text); + datum.text = this.compile(tokens); + return datum; + }); this.update({ isFetching: false, posts: posts