Fix nick-less message timestamps
(broken in previous commit)
This commit is contained in:
parent
9fc20d4f86
commit
fa98b548d0
1 changed files with 6 additions and 4 deletions
|
@ -376,9 +376,13 @@ class TextWin(BaseTextWin):
|
||||||
|
|
||||||
def write_pre_msg(self, msg, with_timestamps, nick_size):
|
def write_pre_msg(self, msg, with_timestamps, nick_size):
|
||||||
offset = 0
|
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)
|
nick = truncate_nick(msg.nickname, nick_size)
|
||||||
if nick is None:
|
|
||||||
return 0
|
|
||||||
offset += poopt.wcswidth(nick)
|
offset += poopt.wcswidth(nick)
|
||||||
if msg.nick_color:
|
if msg.nick_color:
|
||||||
color = msg.nick_color
|
color = msg.nick_color
|
||||||
|
@ -386,8 +390,6 @@ class TextWin(BaseTextWin):
|
||||||
color = msg.user.color
|
color = msg.user.color
|
||||||
else:
|
else:
|
||||||
color = None
|
color = None
|
||||||
if with_timestamps:
|
|
||||||
offset += self.write_time(msg.str_time)
|
|
||||||
if msg.ack:
|
if msg.ack:
|
||||||
if msg.ack > 0:
|
if msg.ack > 0:
|
||||||
offset += self.write_ack()
|
offset += self.write_ack()
|
||||||
|
|
Loading…
Reference in a new issue