Philipp Hörist pushed to branch master at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/common/setting_values.py
    ... ... @@ -128,7 +128,6 @@ class _ACCOUNT_DEFAULT:
    128 128
         'notification_timeout',
    
    129 129
         'preview_max_file_size',
    
    130 130
         'preview_size',
    
    131
    -    'restore_timeout',
    
    132 131
     ]
    
    133 132
     
    
    134 133
     StringSettings = Literal[
    
    ... ... @@ -252,7 +251,6 @@ class _ACCOUNT_DEFAULT:
    252 251
         'preview_verify_https': True,
    
    253 252
         'print_status_in_chats': False,
    
    254 253
         'remote_control': False,
    
    255
    -    'restore_timeout': -1,
    
    256 254
         'roster_theme': 'default',
    
    257 255
         'save_main_window_position': True,
    
    258 256
         'search_engine': 'https://duckduckgo.com/?q=%s',
    
    ... ... @@ -688,9 +686,6 @@ class WorkspaceSettings(TypedDict):
    688 686
             'notify_on_all_muc_messages': '',
    
    689 687
             'plugins_repository_enabled': _(
    
    690 688
                 'If enabled, Gajim offers to download plugins hosted on gajim.org'),
    
    691
    -        'restore_timeout': _(
    
    692
    -            'How far back in time (minutes) chat history is restored. -1 '
    
    693
    -            'means no limit.'),
    
    694 689
             'save_main_window_position': _(
    
    695 690
                 'If enabled, Gajim will save the main window position when hiding '
    
    696 691
                 'it, and restore it when showing the window again.'),
    

  • gajim/common/storage/archive.py
    ... ... @@ -178,7 +178,6 @@ def init(self, **kwargs: Any) -> None:
    178 178
             self._con.row_factory = self._namedtuple_factory
    
    179 179
     
    
    180 180
             self._con.create_function('like', 1, self._like)
    
    181
    -        self._con.create_function('get_timeout', 0, self._get_timeout)
    
    182 181
     
    
    183 182
             self._get_jid_ids_from_db()
    
    184 183
     
    
    ... ... @@ -257,18 +256,6 @@ def _migrate(self) -> None:
    257 256
                 ]
    
    258 257
                 self._execute_multiple(statements)
    
    259 258
     
    
    260
    -    @staticmethod
    
    261
    -    def _get_timeout() -> int:
    
    262
    -        '''
    
    263
    -        returns the timeout in epoch
    
    264
    -        '''
    
    265
    -        timeout = app.settings.get('restore_timeout')
    
    266
    -
    
    267
    -        now = int(time.time())
    
    268
    -        if timeout > 0:
    
    269
    -            timeout = now - (timeout * 60)
    
    270
    -        return timeout
    
    271
    -
    
    272 259
         @staticmethod
    
    273 260
         def _like(search_str: str) -> str:
    
    274 261
             return f'%{search_str}%'