Remove "custom on success" logic from Image.
Create a new message element and message layout element type for mod badges.
This commit is contained in:
@@ -349,9 +349,6 @@ void Image::actuallyLoad()
|
||||
if (!shared)
|
||||
return Failure;
|
||||
|
||||
if (shared->customOnSuccess_)
|
||||
return shared->customOnSuccess_(shared, result);
|
||||
|
||||
auto data = result.getData();
|
||||
|
||||
// const cast since we are only reading from it
|
||||
@@ -396,11 +393,4 @@ bool Image::operator!=(const Image &other) const
|
||||
return !this->operator==(other);
|
||||
}
|
||||
|
||||
ImagePtr Image::setCustomOnSuccess(
|
||||
std::function<Outcome(ImagePtr, NetworkResult)> customOnSuccess)
|
||||
{
|
||||
this->customOnSuccess_ = customOnSuccess;
|
||||
return shared_from_this();
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user