mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
First version of caching in media streaming.
This commit is contained in:
@@ -145,11 +145,15 @@ Session::Session(not_null<AuthSession*> session)
|
||||
, _cache(Core::App().databases().get(
|
||||
Local::cachePath(),
|
||||
Local::cacheSettings()))
|
||||
, _bigFileCache(Core::App().databases().get(
|
||||
Local::cacheBigFilePath(),
|
||||
Local::cacheBigFileSettings()))
|
||||
, _selfDestructTimer([=] { checkSelfDestructItems(); })
|
||||
, _a_sendActions(animation(this, &Session::step_typings))
|
||||
, _groups(this)
|
||||
, _unmuteByFinishedTimer([=] { unmuteByFinished(); }) {
|
||||
_cache->open(Local::cacheKey());
|
||||
_bigFileCache->open(Local::cacheBigFileKey());
|
||||
|
||||
setupContactViewsViewer();
|
||||
setupChannelLeavingViewer();
|
||||
@@ -745,6 +749,10 @@ Storage::Cache::Database &Session::cache() {
|
||||
return *_cache;
|
||||
}
|
||||
|
||||
Storage::Cache::Database &Session::cacheBigFile() {
|
||||
return *_bigFileCache;
|
||||
}
|
||||
|
||||
void Session::startExport(PeerData *peer) {
|
||||
startExport(peer ? peer->input : MTP_inputPeerEmpty());
|
||||
}
|
||||
|
Reference in New Issue
Block a user