mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Mark image as empty if network request fails
This commit is contained in:
parent
d16307a484
commit
4752a3a4d4
|
@ -310,6 +310,14 @@ void Image::load()
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
});
|
});
|
||||||
|
req.onError([that = this, weak = weakOf(this)](auto result) -> bool {
|
||||||
|
auto shared = weak.lock();
|
||||||
|
if (!shared) return false;
|
||||||
|
|
||||||
|
shared->empty_ = true;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
req.execute();
|
req.execute();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue