add option to disable last crashed popup

This commit is contained in:
HJfod 2023-07-29 20:56:46 +03:00
parent 6d92bb817f
commit e00b3a6a7f
2 changed files with 11 additions and 1 deletions

View file

@ -70,6 +70,12 @@
"default": true,
"name": "Auto-Update Mods",
"description": "Automatically update <cp>mods</c> on startup"
},
"disable-last-crashed-popup": {
"type": "bool",
"default": false,
"name": "Disable Crash Popup",
"description": "Disables the popup at startup asking if you'd like to send a bug report; intended for developers"
}
},
"issues": {

View file

@ -139,7 +139,11 @@ struct CustomMenuLayer : Modify<CustomMenuLayer, MenuLayer> {
// show crash info
static bool shownLastCrash = false;
if (Loader::get()->didLastLaunchCrash() && !shownLastCrash) {
if (
Loader::get()->didLastLaunchCrash() &&
!shownLastCrash &&
!Mod::get()->template getSettingValue<bool>("disable-last-crashed-popup")
) {
shownLastCrash = true;
auto popup = createQuickPopup(
"Crashed",