2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Save last playback position for long videos.

This commit is contained in:
John Preston
2019-12-25 18:19:52 +03:00
parent b584204522
commit e9620af6fb
3 changed files with 71 additions and 1 deletions

View File

@@ -153,6 +153,9 @@ public:
_variables.groupStickersSectionHidden.remove(peerId);
}
void setMediaLastPlaybackPosition(DocumentId id, crl::time time);
[[nodiscard]] crl::time mediaLastPlaybackPosition(DocumentId id) const;
[[nodiscard]] Data::AutoDownload::Full &autoDownload() {
return _variables.autoDownload;
}
@@ -277,6 +280,7 @@ private:
bool suggestEmoji = true;
bool suggestStickersByEmoji = true;
rpl::variable<bool> spellcheckerEnabled = true;
std::vector<std::pair<DocumentId, crl::time>> mediaLastPlaybackPosition;
static constexpr auto kDefaultSupportChatsLimitSlice
= 7 * 24 * 60 * 60;