Differences From
Artifact [ee058ed0af]:
63 63 s:lpush('<div class="stats">')
64 64 if p.rts > 0 then s:lpush('<div class="rt">' ):ipush(p.rts ):lpush('</div>') end
65 65 if p.likes > 0 then s:lpush('<div class="like">'):ipush(p.likes):lpush('</div>') end
66 66 s:lpush('</div>')
67 67 tpl.stats = s:finalize()
68 68 end
69 69
70 - var attrbuf: int8[32]
70 + var attrbuf: int8[48]
71 + var attrcur = &attrbuf[0]
71 72 if p.accent ~= -1 and p.accent ~= co.ui_hue then
72 73 var hdecbuf: int8[21]
73 74 var hdec = lib.math.decstr(p.accent, &hdecbuf[20])
74 - lib.str.cpy(&attrbuf[0], ' style="--hue:')
75 - lib.str.cpy(&attrbuf[14], hdec)
76 - var len = &hdecbuf[20] - hdec
77 - lib.str.cpy(&attrbuf[14] + len, '"')
78 - tpl.attr = &attrbuf[0]
75 + attrcur = lib.str.cpy(attrcur,' style="--hue:')
76 + attrcur = lib.str.cpy(attrcur, hdec)
77 + -- var len = &hdecbuf[20] - hdec
78 + attrcur = lib.str.cpy(attrcur, '"')
79 79 end
80 + if p.author == co.who.id then attrcur = lib.str.cpy(attrcur, ' data-own') end
81 +
82 + if attrcur ~= &attrbuf[0] then tpl.attr = &attrbuf[0] end
80 83
81 84 defer tpl.permalink:free()
82 85 if acc ~= nil then
83 86 if retweeter ~= nil then push_promo_header(co, acc, retweeter, p.rtact) end
84 87 tpl:append(acc)
85 88 if retweeter ~= nil then acc:lpush('</div>') end
86 89 if p.rts + p.likes > 0 then tpl.stats:free() end