mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Save pts and date only if there is something to save
This commit is contained in:
parent
5ed7bf7815
commit
7d0efcf50f
|
@ -419,13 +419,14 @@ class TelegramBaseClient(abc.ABC):
|
|||
self._updates_queue.clear()
|
||||
|
||||
pts, date = self._state_cache[None]
|
||||
self.session.set_update_state(0, types.updates.State(
|
||||
pts=pts,
|
||||
qts=0,
|
||||
date=date,
|
||||
seq=0,
|
||||
unread_count=0
|
||||
))
|
||||
if pts and date:
|
||||
self.session.set_update_state(0, types.updates.State(
|
||||
pts=pts,
|
||||
qts=0,
|
||||
date=date,
|
||||
seq=0,
|
||||
unread_count=0
|
||||
))
|
||||
|
||||
self.session.close()
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Versions should comply with PEP440.
|
||||
# This line is parsed in setup.py:
|
||||
__version__ = '1.7.5'
|
||||
__version__ = '1.7.6'
|
||||
|
|
Loading…
Reference in New Issue
Block a user