feat: add "clear cache" button to settings (#3277)
Co-authored-by: Leon Richardt <leon.richardt@gmail.com> Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
- Minor: Added chatter count to viewer list popout (#3261)
|
- Minor: Added chatter count to viewer list popout (#3261)
|
||||||
- Minor: Added highlights for first messages (#3267)
|
- Minor: Added highlights for first messages (#3267)
|
||||||
- Minor: Ignore out of bounds check for tiling wms (#3270)
|
- Minor: Ignore out of bounds check for tiling wms (#3270)
|
||||||
|
- Minor: Add clear cache button to cache settings section (#3277)
|
||||||
- Minor: Added `flags.first_message` filter variable (#3292)
|
- Minor: Added `flags.first_message` filter variable (#3292)
|
||||||
- Minor: Removed duplicate setting for toggling `Channel Point Redeemed Message` highlights (#3296)
|
- Minor: Removed duplicate setting for toggling `Channel Point Redeemed Message` highlights (#3296)
|
||||||
- Minor: Clean up chat messages of special line characters prior to sending. (#3312)
|
- Minor: Clean up chat messages of special line characters prior to sending. (#3312)
|
||||||
|
|||||||
@@ -503,6 +503,20 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
|||||||
box->addWidget(layout.makeButton("Reset", []() {
|
box->addWidget(layout.makeButton("Reset", []() {
|
||||||
getSettings()->cachePath = "";
|
getSettings()->cachePath = "";
|
||||||
}));
|
}));
|
||||||
|
box->addWidget(layout.makeButton("Clear Cache", [&layout]() {
|
||||||
|
auto reply = QMessageBox::question(
|
||||||
|
layout.window(), "Clear cache",
|
||||||
|
"Are you sure that you want to clear your cache? Emotes may "
|
||||||
|
"take longer to load next time Chatterino is started.",
|
||||||
|
QMessageBox::Yes | QMessageBox::No);
|
||||||
|
|
||||||
|
if (reply == QMessageBox::Yes)
|
||||||
|
{
|
||||||
|
auto cacheDir = QDir(getPaths()->cacheDirectory());
|
||||||
|
cacheDir.removeRecursively();
|
||||||
|
cacheDir.mkdir(getPaths()->cacheDirectory());
|
||||||
|
}
|
||||||
|
}));
|
||||||
box->addStretch(1);
|
box->addStretch(1);
|
||||||
|
|
||||||
layout.addLayout(box);
|
layout.addLayout(box);
|
||||||
|
|||||||
Reference in New Issue
Block a user