primitivus (chat): only scroll down if we are at the bottom of the discussion
This commit is contained in:
parent
60700377b8
commit
252e0e29f4
1 changed files with 4 additions and 1 deletions
|
|
@ -449,7 +449,10 @@ class Chat(PrimitivusWidget, quick_chat.QuickChat):
|
|||
else:
|
||||
wid = MessageWidget(message)
|
||||
self.mess_walker.append(wid)
|
||||
self.mess_widgets.focus_position = len(self.mess_walker) - 1 # scroll down
|
||||
current_focus = self.mess_widgets.focus_position
|
||||
bottom = len(self.mess_walker) - 1
|
||||
if current_focus == bottom - 1:
|
||||
self.mess_widgets.focus_position = bottom # scroll down
|
||||
self.host.redraw() # FIXME: should not be necessary
|
||||
if self._user_moved(message):
|
||||
return # no notification for moved messages
|
||||
|
|
|
|||
Loading…
Reference in a new issue