mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed loading cached files twice
This commit is contained in:
parent
720e5aa25f
commit
d451b31cee
1 changed files with 4 additions and 1 deletions
|
@ -32,6 +32,10 @@ NetworkData::~NetworkData()
|
|||
|
||||
QString NetworkData::getHash()
|
||||
{
|
||||
static std::mutex mu;
|
||||
|
||||
std::lock_guard lock(mu);
|
||||
|
||||
if (this->hash_.isEmpty())
|
||||
{
|
||||
QByteArray bytes;
|
||||
|
@ -242,7 +246,6 @@ void load(const std::shared_ptr<NetworkData> &data)
|
|||
if (data->cache_)
|
||||
{
|
||||
QtConcurrent::run(loadCached, data);
|
||||
loadCached(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue