refactor: Remove most raw accesses into Application (#5104)
This commit is contained in:
@@ -78,8 +78,6 @@ bool MessageLayout::layout(int width, float scale, MessageElementFlags flags)
|
||||
{
|
||||
// BenchmarkGuard benchmark("MessageLayout::layout()");
|
||||
|
||||
auto *app = getApp();
|
||||
|
||||
bool layoutRequired = false;
|
||||
|
||||
// check if width changed
|
||||
@@ -88,11 +86,12 @@ bool MessageLayout::layout(int width, float scale, MessageElementFlags flags)
|
||||
this->currentLayoutWidth_ = width;
|
||||
|
||||
// check if layout state changed
|
||||
if (this->layoutState_ != app->windows->getGeneration())
|
||||
const auto layoutGeneration = getIApp()->getWindows()->getGeneration();
|
||||
if (this->layoutState_ != layoutGeneration)
|
||||
{
|
||||
layoutRequired = true;
|
||||
this->flags.set(MessageLayoutFlag::RequiresBufferUpdate);
|
||||
this->layoutState_ = app->windows->getGeneration();
|
||||
this->layoutState_ = layoutGeneration;
|
||||
}
|
||||
|
||||
// check if work mask changed
|
||||
|
||||
Reference in New Issue
Block a user