From ff2aa768c903d31463696b6d7aa34b54c7a215fa Mon Sep 17 00:00:00 2001 From: nekobit Date: Sun, 26 Jun 2022 05:04:41 +0000 Subject: [PATCH] Use insertAdjacentHTML for the emojo picker: FossilOrigin-Name: b42f9e4982e0e02f62c1d5de7e41c4fb9d35326149ebab55a853d0bd672cc45e --- dist/js/emoji.js | 2 +- src/timeline.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dist/js/emoji.js b/dist/js/emoji.js index cf98852..ce3818f 100644 --- a/dist/js/emoji.js +++ b/dist/js/emoji.js @@ -11,5 +11,5 @@ function get_emojo_picker(callback) } get_emojo_picker((emojo_picker_str) => { - document.body.innerHTML += emojo_picker_str; + document.body.insertAdjacentHTML('beforeend', emojo_picker_str); }); diff --git a/src/timeline.c b/src/timeline.c index bda7a13..b226628 100644 --- a/src/timeline.c +++ b/src/timeline.c @@ -125,7 +125,7 @@ void tl_home(struct session* ssn, mastodont_t* api, int local) struct mstdnt_storage storage = { 0 }; struct mstdnt_timeline_args args = { - .with_muted = 1, + .with_muted = MSTDNT_TRUE, .local = local, // Converts to `enum mstdnt_reply_visibility' nicely .reply_visibility = (ssn->post.replies_only.is_set ? @@ -135,7 +135,9 @@ void tl_home(struct session* ssn, mastodont_t* api, int local) .max_id = keystr(ssn->post.max_id), .since_id = NULL, .min_id = keystr(ssn->post.min_id), - .limit = 20 + .offset = 4, + .limit = 20, + .remote = MSTDNT_BOOL_UNSET, }; try_post_status(ssn, api);