~reedwade/wee-matter-devel

wee-matter: Only do click action when clicked v1 APPLIED

~midgard: 1
 Only do click action when clicked

 1 files changed, 4 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~reedwade/wee-matter-devel/patches/15141/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH wee-matter] Only do click action when clicked Export this patch

From: Midgard <2885-Midgard@users.noreply.framagit.org>

Scrolling used to trigger the click action too, spamming the input line
with message IDs.
---
 wee_matter/room.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/wee_matter/room.py b/wee_matter/room.py
index 32be2bf..990d954 100644
--- a/wee_matter/room.py
+++ b/wee_matter/room.py
@@ -239,9 +239,12 @@ def buffer_switch_cb(data, signal, buffer):
    return weechat.WEECHAT_RC_OK

def channel_click_cb(data, info):
    if not "_buffer_localvar_script_name" in info or "wee-matter" != info["_buffer_localvar_script_name"]:
    if "wee-matter" != info.get("_buffer_localvar_script_name"):
        return info

    if info["_key"] != "button1":
        return

    if "post_id_" in info["_chat_line_tags"]:
        wee_matter.post.handle_post_click(data, info)
    elif "file_id_" in info["_chat_line_tags"]:
-- 
2.26.2
Eddie Barraco
Thanks a lot !

To git.sr.ht:~reedwade/wee-matter
   0fee936..332c1e8  332c1e8 -> master