~tardypad/wee-most

3e0d1b1a9a9a3366ffb9439d5b4a88639c87db50 — Damien Tardy-Panis 28 days ago b5d848c master
Fix double get_channel_from_buffer calls during buffer switch
1 files changed, 4 insertions(+), 3 deletions(-)

M wee_most/channel.py
M wee_most/channel.py => wee_most/channel.py +4 -3
@@ 300,9 300,10 @@ def set_channel_properties_from_channel_data(channel_data, server):

def buffer_switch_cb(data, signal, buffer):
    for server in servers.values():
        if server.get_channel_from_buffer(buffer):
            server.get_channel_from_buffer(buffer).mark_as_read()
            return weechat.WEECHAT_RC_OK
        channel = server.get_channel_from_buffer(buffer)
        if channel:
            channel.mark_as_read()
            break

    return weechat.WEECHAT_RC_OK