chore: add some channel view layout commands (#6342)
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
- Dev: Bumped clang-format requirement to 19. (#6236)
|
||||
- Dev: Factored out AUMID to `Version`. (#6321)
|
||||
- Dev: Silenced some warnings when compiling with clang-cl. (#6331)
|
||||
- Dev: Added some commands for forcing a relayout (and related things) in channel views. (#6342)
|
||||
|
||||
## 2.5.3
|
||||
|
||||
|
||||
@@ -462,6 +462,15 @@ CommandController::CommandController(const Paths &paths)
|
||||
this->registerCommand("/debug-force-image-unload",
|
||||
&commands::forceImageUnload);
|
||||
|
||||
this->registerCommand("/debug-force-layout-channel-views",
|
||||
&commands::forceLayoutChannelViews);
|
||||
|
||||
this->registerCommand("/debug-increment-image-generation",
|
||||
&commands::incrementImageGeneration);
|
||||
|
||||
this->registerCommand("/debug-invalidate-buffers",
|
||||
&commands::invalidateBuffers);
|
||||
|
||||
this->registerCommand("/debug-test", &commands::debugTest);
|
||||
|
||||
this->registerCommand("/shield", &commands::shieldModeOn);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||
#include "singletons/Theme.hpp"
|
||||
#include "singletons/Toasts.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/PostToThread.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
@@ -139,6 +140,24 @@ QString forceImageUnload(const CommandContext &ctx)
|
||||
return "";
|
||||
}
|
||||
|
||||
QString forceLayoutChannelViews(const CommandContext & /*ctx*/)
|
||||
{
|
||||
getApp()->getWindows()->forceLayoutChannelViews();
|
||||
return {};
|
||||
}
|
||||
|
||||
QString incrementImageGeneration(const CommandContext & /*ctx*/)
|
||||
{
|
||||
getApp()->getWindows()->incGeneration();
|
||||
return {};
|
||||
}
|
||||
|
||||
QString invalidateBuffers(const CommandContext & /*ctx*/)
|
||||
{
|
||||
getApp()->getWindows()->invalidateChannelViewBuffers();
|
||||
return {};
|
||||
}
|
||||
|
||||
QString debugTest(const CommandContext &ctx)
|
||||
{
|
||||
if (!ctx.channel)
|
||||
|
||||
@@ -22,6 +22,12 @@ QString forceImageGarbageCollection(const CommandContext &ctx);
|
||||
|
||||
QString forceImageUnload(const CommandContext &ctx);
|
||||
|
||||
QString forceLayoutChannelViews(const CommandContext &ctx);
|
||||
|
||||
QString incrementImageGeneration(const CommandContext &ctx);
|
||||
|
||||
QString invalidateBuffers(const CommandContext &ctx);
|
||||
|
||||
QString debugTest(const CommandContext &ctx);
|
||||
|
||||
} // namespace chatterino::commands
|
||||
|
||||
@@ -735,8 +735,8 @@ void ChannelView::layoutVisibleMessages(
|
||||
|
||||
y += message->getHeight();
|
||||
}
|
||||
this->bufferInvalidationQueued_ = false;
|
||||
}
|
||||
this->bufferInvalidationQueued_ = false;
|
||||
|
||||
if (redrawRequired)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user