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:
@@ -68,18 +68,13 @@ public:
|
||||
bool operator==(const Image &image) const;
|
||||
bool operator!=(const Image &image) const;
|
||||
|
||||
ImagePtr setCustomOnSuccess(
|
||||
std::function<Outcome(ImagePtr, NetworkResult)> onSuccess);
|
||||
|
||||
private:
|
||||
Image();
|
||||
Image(const Url &url, qreal scale);
|
||||
Image(qreal scale);
|
||||
|
||||
public:
|
||||
void setPixmap(const QPixmap &pixmap);
|
||||
|
||||
private:
|
||||
void actuallyLoad();
|
||||
|
||||
Url url_{};
|
||||
@@ -88,6 +83,5 @@ private:
|
||||
bool shouldLoad_{false};
|
||||
std::unique_ptr<detail::Frames> frames_{};
|
||||
QObject object_{};
|
||||
std::function<Outcome(ImagePtr, NetworkResult)> customOnSuccess_{};
|
||||
};
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user