Use shaka instead of heart.

This commit is contained in:
Thomas Mathews 2023-01-27 10:47:44 -08:00
parent bb680be9b7
commit 378af1dcac
4 changed files with 4 additions and 3 deletions

View file

@ -12,6 +12,7 @@ const TAG_P = "#p";
const TAG_E = "#e";
const R_HEART = "❤️";
const R_SHAKA = "🤙";
const STANDARD_KINDS = [
KIND_NOTE,

View file

@ -196,7 +196,7 @@ function render_action_bar(model, ev, opts={}) {
let { can_delete, shared } = opts;
// TODO rewrite all of the toggle heart code. It's mine & I hate it.
const thread_root = (ev.refs && ev.refs.root) || ev.id;
const reaction = model_get_reacts_to(model, pubkey, ev.id, R_HEART);
const reaction = model_get_reacts_to(model, pubkey, ev.id, R_SHAKA);
const liked = !!reaction;
const reaction_id = reaction ? reaction.id : "";
let str = html`<div class="action-bar">`;

View file

@ -486,7 +486,7 @@ function view_timeline_update_reaction(model, ev) {
// Update like button
if (ev.pubkey == model.pubkey) {
const reaction = model_get_reacts_to(model, model.pubkey, ev_id, R_HEART);
const reaction = model_get_reacts_to(model, model.pubkey, ev_id, R_SHAKA);
const liked = !!reaction;
const img = find_node("button.icon.heart > img", root);
const btn = find_node("button.icon.heart", root)

View file

@ -58,7 +58,7 @@ function click_toggle_like(el) {
delete_post(el.dataset.reactionId);
return;
}
send_reply(R_HEART, el.dataset.reactingTo);
send_reply(R_SHAKA, el.dataset.reactingTo);
}
/* open_media_preview presents a modal to display an image via "url".