From fa98b548d043fd93041387903f9581b39bdbc344 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 23 Nov 2015 19:42:34 +0100 Subject: Fix nick-less message timestamps (broken in previous commit) --- src/windows/text_win.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/windows') diff --git a/src/windows/text_win.py b/src/windows/text_win.py index cc4b5189..dda33f3e 100644 --- a/src/windows/text_win.py +++ b/src/windows/text_win.py @@ -376,9 +376,13 @@ class TextWin(BaseTextWin): def write_pre_msg(self, msg, with_timestamps, nick_size): offset = 0 + if with_timestamps: + offset += self.write_time(msg.str_time) + + if msg.nickname is None: # not a message, nothing to do afterwards + return offset + nick = truncate_nick(msg.nickname, nick_size) - if nick is None: - return 0 offset += poopt.wcswidth(nick) if msg.nick_color: color = msg.nick_color @@ -386,8 +390,6 @@ class TextWin(BaseTextWin): color = msg.user.color else: color = None - if with_timestamps: - offset += self.write_time(msg.str_time) if msg.ack: if msg.ack > 0: offset += self.write_ack() -- cgit v1.2.3