Add settings to increase split and usercard scrollback (#3811)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Patrick Geneva 2022-11-12 10:53:42 -05:00 committed by GitHub
parent a8b4eaa431
commit 3ed7489e0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 4 deletions

View file

@ -6,6 +6,8 @@
- Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694, #3875) - Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694, #3875)
- Major: Added support for emotes and badges from [7TV](https://7tv.app). [Wiki Page](https://wiki.chatterino.com/Third_party_services/#7tv) (#4002, #4062) - Major: Added support for emotes and badges from [7TV](https://7tv.app). [Wiki Page](https://wiki.chatterino.com/Third_party_services/#7tv) (#4002, #4062)
- Major: Added support for Right-to-Left Languages (#3958, #4139) - Major: Added support for Right-to-Left Languages (#3958, #4139)
- Minor: Added setting to keep more message history in splits. (#3811)
- Minor: Added setting to keep more message history in usercards. (#3811)
- Minor: Added ability to pin Usercards to stay open even if it loses focus. Only available if "Automatically close usercard when it loses focus" is enabled. (#3884) - Minor: Added ability to pin Usercards to stay open even if it loses focus. Only available if "Automatically close usercard when it loses focus" is enabled. (#3884)
- Minor: Allow hiding moderation actions in streamer mode. (#3926) - Minor: Allow hiding moderation actions in streamer mode. (#3926)
- Minor: Added highlights for `Elevated Messages`. (#4016) - Minor: Added highlights for `Elevated Messages`. (#4016)

View file

@ -430,6 +430,14 @@ public:
"/misc/twitch/messageHistoryLimit", "/misc/twitch/messageHistoryLimit",
800, 800,
}; };
IntSetting scrollbackSplitLimit = {
"/misc/scrollback/splitLimit",
1000,
};
IntSetting scrollbackUsercardLimit = {
"/misc/scrollback/usercardLimit",
1000,
};
// Temporary time-gate-overrides // Temporary time-gate-overrides
EnumSetting<HelixTimegateOverride> helixTimegateRaid = { EnumSetting<HelixTimegateOverride> helixTimegateRaid = {

View file

@ -512,7 +512,8 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent,
this->ui_.noMessagesLabel->setVisible(false); this->ui_.noMessagesLabel->setVisible(false);
this->ui_.latestMessages = this->ui_.latestMessages =
new ChannelView(this, this->split_, ChannelView::Context::UserCard); new ChannelView(this, this->split_, ChannelView::Context::UserCard,
getSettings()->scrollbackUsercardLimit);
this->ui_.latestMessages->setMinimumSize(400, 275); this->ui_.latestMessages->setMinimumSize(400, 275);
this->ui_.latestMessages->setSizePolicy(QSizePolicy::Expanding, this->ui_.latestMessages->setSizePolicy(QSizePolicy::Expanding,
QSizePolicy::Expanding); QSizePolicy::Expanding);

View file

@ -137,12 +137,14 @@ namespace {
} }
} // namespace } // namespace
ChannelView::ChannelView(BaseWidget *parent, Split *split, Context context) ChannelView::ChannelView(BaseWidget *parent, Split *split, Context context,
size_t messagesLimit)
: BaseWidget(parent) : BaseWidget(parent)
, split_(split) , split_(split)
, scrollBar_(new Scrollbar(this)) , scrollBar_(new Scrollbar(this))
, highlightAnimation_(this) , highlightAnimation_(this)
, context_(context) , context_(context)
, messages_(messagesLimit)
{ {
this->setMouseTracking(true); this->setMouseTracking(true);

View file

@ -71,7 +71,8 @@ public:
}; };
explicit ChannelView(BaseWidget *parent = nullptr, Split *split = nullptr, explicit ChannelView(BaseWidget *parent = nullptr, Split *split = nullptr,
Context context = Context::None); Context context = Context::None,
size_t messagesLimit = 1000);
void queueUpdate(); void queueUpdate();
Scrollbar &getScrollBar(); Scrollbar &getScrollBar();

View file

@ -767,6 +767,11 @@ void GeneralPage::initLayout(GeneralPageView &layout)
layout.addIntInput("Max number of history messages to load on connect", layout.addIntInput("Max number of history messages to load on connect",
s.twitchMessageHistoryLimit, 10, 800, 10); s.twitchMessageHistoryLimit, 10, 800, 10);
layout.addIntInput("Split message scrollback limit (requires restart)",
s.scrollbackSplitLimit, 100, 100000, 100);
layout.addIntInput("Usercard scrollback limit (requires restart)",
s.scrollbackUsercardLimit, 100, 100000, 100);
layout.addCheckbox("Enable experimental IRC support (requires restart)", layout.addCheckbox("Enable experimental IRC support (requires restart)",
s.enableExperimentalIrc); s.enableExperimentalIrc);
layout.addCheckbox("Show unhandled IRC messages", layout.addCheckbox("Show unhandled IRC messages",

View file

@ -86,7 +86,8 @@ Split::Split(QWidget *parent)
, channel_(Channel::getEmpty()) , channel_(Channel::getEmpty())
, vbox_(new QVBoxLayout(this)) , vbox_(new QVBoxLayout(this))
, header_(new SplitHeader(this)) , header_(new SplitHeader(this))
, view_(new ChannelView(this, this)) , view_(new ChannelView(this, this, ChannelView::Context::None,
getSettings()->scrollbackSplitLimit))
, input_(new SplitInput(this)) , input_(new SplitInput(this))
, overlay_(new SplitOverlay(this)) , overlay_(new SplitOverlay(this))
{ {