Philipp Hörist pushed to branch storage at gajim / gajim
Commits:
2d1dc1e6 by Philipp Hörist at 2024-04-11T17:49:44+02:00
imprv: SearchView: Simplify jumping to dates
- - - - -
2 changed files:
- gajim/common/storage/archive/storage.py
- gajim/gtk/search_view.py
Changes:
=====================================
gajim/common/storage/archive/storage.py
=====================================
@@ -711,9 +711,6 @@ def get_first_message_meta_for_date(
return None
return result.pk, result.timestamp
- def date_has_history(self, account: str, jid: JID, date: dt.date) -> bool:
- return self.get_first_message_meta_for_date(account, jid, date) is not
None
-
@with_session
@timeit
def get_recent_muc_nicks(
=====================================
gajim/gtk/search_view.py
=====================================
@@ -282,8 +282,8 @@ def _select_date(self,
assert self._jid is not None
assert self._account is not None
- date_contains_messages = False
- while not date_contains_messages:
+ day_has_messages = False
+ while not day_has_messages:
if direction == Direction.PREV:
if end_date <= date:
return
@@ -294,8 +294,7 @@ def _select_date(self,
date = date + delta
if date == end_date:
break
- date_contains_messages = app.storage.archive.date_has_history(
- self._account, self._jid, date)
+ day_has_messages = self._ui.calendar.get_day_is_marked(date.day)
gtk_m = gtk_month(date.month)
if gtk_m != month or date.year != year:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/2d1dc1e64ee7764eaef97cc83ab05dd6526db1f5
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/2d1dc1e64ee7764eaef97cc83ab05dd6526db1f5
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]