Daniel Brötzmann pushed to branch mainwindow at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/gtk/controls/base.py
    ... ... @@ -1340,6 +1340,9 @@ def fetch_n_lines_history(self, _scrolled, before, n_lines):
    1340 1340
     
    
    1341 1341
             self.add_messages(messages)
    
    1342 1342
     
    
    1343
    +        if len(messages) < n_lines:
    
    1344
    +            self._scrolled_view.set_history_complete(before, True)
    
    1345
    +
    
    1343 1346
             if self._scrolled_view.get_autoscroll():
    
    1344 1347
                 if self.conversation_view.reduce_message_count(before):
    
    1345 1348
                     self._scrolled_view.set_history_complete(before, False)
    

  • gajim/gtk/conversation/scrolled.py
    ... ... @@ -75,6 +75,7 @@ def reset(self):
    75 75
             self._upper_complete = False
    
    76 76
             self._lower_complete = False
    
    77 77
             self._requesting = None
    
    78
    +        self.set_history_complete(True, False)
    
    78 79
     
    
    79 80
         def set_history_complete(self, before, complete):
    
    80 81
             if before:
    
    ... ... @@ -104,6 +105,9 @@ def _on_adj_upper_changed(self, adj, *args):
    104 105
             if upper == adj.get_page_size():
    
    105 106
                 # There is no scrollbar, request history until there is
    
    106 107
                 self.emit('request-history', True)
    
    108
    +            self._lower_complete = True
    
    109
    +            self._autoscroll = True
    
    110
    +            self.emit('autoscroll-changed', self._autoscroll)
    
    107 111
             self._requesting = None
    
    108 112
     
    
    109 113
         def _on_adj_value_changed(self, adj, *args):