Philipp Hörist pushed to branch master at gajim / gajim
Commits:
3543572a by lovetox at 2022-08-18T16:45:20+02:00
refactor: Remove unused code
- - - - -
2 changed files:
- gajim/common/setting_values.py
- gajim/common/storage/archive.py
Changes:
=====================================
gajim/common/setting_values.py
=====================================
@@ -128,7 +128,6 @@ class _ACCOUNT_DEFAULT:
'notification_timeout',
'preview_max_file_size',
'preview_size',
- 'restore_timeout',
]
StringSettings = Literal[
@@ -252,7 +251,6 @@ class _ACCOUNT_DEFAULT:
'preview_verify_https': True,
'print_status_in_chats': False,
'remote_control': False,
- 'restore_timeout': -1,
'roster_theme': 'default',
'save_main_window_position': True,
'search_engine': 'https://duckduckgo.com/?q=%s',
@@ -688,9 +686,6 @@ class WorkspaceSettings(TypedDict):
'notify_on_all_muc_messages': '',
'plugins_repository_enabled': _(
'If enabled, Gajim offers to download plugins hosted on
gajim.org'),
- 'restore_timeout': _(
- 'How far back in time (minutes) chat history is restored. -1 '
- 'means no limit.'),
'save_main_window_position': _(
'If enabled, Gajim will save the main window position when hiding '
'it, and restore it when showing the window again.'),
=====================================
gajim/common/storage/archive.py
=====================================
@@ -178,7 +178,6 @@ def init(self, **kwargs: Any) -> None:
self._con.row_factory = self._namedtuple_factory
self._con.create_function('like', 1, self._like)
- self._con.create_function('get_timeout', 0, self._get_timeout)
self._get_jid_ids_from_db()
@@ -257,18 +256,6 @@ def _migrate(self) -> None:
]
self._execute_multiple(statements)
- @staticmethod
- def _get_timeout() -> int:
- '''
- returns the timeout in epoch
- '''
- timeout = app.settings.get('restore_timeout')
-
- now = int(time.time())
- if timeout > 0:
- timeout = now - (timeout * 60)
- return timeout
-
@staticmethod
def _like(search_str: str) -> str:
return f'%{search_str}%'
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/3543572a85dacce94d09d63f7b215ed12ad0b1c4
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/3543572a85dacce94d09d63f7b215ed12ad0b1c4
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits