mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add settings to increase split and usercard scrollback (#3811)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
a8b4eaa431
commit
3ed7489e0f
|
@ -6,6 +6,8 @@
|
|||
- 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 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: Allow hiding moderation actions in streamer mode. (#3926)
|
||||
- Minor: Added highlights for `Elevated Messages`. (#4016)
|
||||
|
|
|
@ -430,6 +430,14 @@ public:
|
|||
"/misc/twitch/messageHistoryLimit",
|
||||
800,
|
||||
};
|
||||
IntSetting scrollbackSplitLimit = {
|
||||
"/misc/scrollback/splitLimit",
|
||||
1000,
|
||||
};
|
||||
IntSetting scrollbackUsercardLimit = {
|
||||
"/misc/scrollback/usercardLimit",
|
||||
1000,
|
||||
};
|
||||
|
||||
// Temporary time-gate-overrides
|
||||
EnumSetting<HelixTimegateOverride> helixTimegateRaid = {
|
||||
|
|
|
@ -512,7 +512,8 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent,
|
|||
this->ui_.noMessagesLabel->setVisible(false);
|
||||
|
||||
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->setSizePolicy(QSizePolicy::Expanding,
|
||||
QSizePolicy::Expanding);
|
||||
|
|
|
@ -137,12 +137,14 @@ namespace {
|
|||
}
|
||||
} // namespace
|
||||
|
||||
ChannelView::ChannelView(BaseWidget *parent, Split *split, Context context)
|
||||
ChannelView::ChannelView(BaseWidget *parent, Split *split, Context context,
|
||||
size_t messagesLimit)
|
||||
: BaseWidget(parent)
|
||||
, split_(split)
|
||||
, scrollBar_(new Scrollbar(this))
|
||||
, highlightAnimation_(this)
|
||||
, context_(context)
|
||||
, messages_(messagesLimit)
|
||||
{
|
||||
this->setMouseTracking(true);
|
||||
|
||||
|
|
|
@ -71,7 +71,8 @@ public:
|
|||
};
|
||||
|
||||
explicit ChannelView(BaseWidget *parent = nullptr, Split *split = nullptr,
|
||||
Context context = Context::None);
|
||||
Context context = Context::None,
|
||||
size_t messagesLimit = 1000);
|
||||
|
||||
void queueUpdate();
|
||||
Scrollbar &getScrollBar();
|
||||
|
|
|
@ -767,6 +767,11 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
|||
layout.addIntInput("Max number of history messages to load on connect",
|
||||
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)",
|
||||
s.enableExperimentalIrc);
|
||||
layout.addCheckbox("Show unhandled IRC messages",
|
||||
|
|
|
@ -86,7 +86,8 @@ Split::Split(QWidget *parent)
|
|||
, channel_(Channel::getEmpty())
|
||||
, vbox_(new QVBoxLayout(this))
|
||||
, header_(new SplitHeader(this))
|
||||
, view_(new ChannelView(this, this))
|
||||
, view_(new ChannelView(this, this, ChannelView::Context::None,
|
||||
getSettings()->scrollbackSplitLimit))
|
||||
, input_(new SplitInput(this))
|
||||
, overlay_(new SplitOverlay(this))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue