Fix "skipFeedbackDialog" patch

This commit is contained in:
redphx
2025-05-29 08:21:36 +07:00
parent c829f74dcc
commit 9e851fbd15
3 changed files with 10 additions and 11 deletions

View File

@@ -583,12 +583,13 @@ true` + text;
},
skipFeedbackDialog(str: string) {
let text = 'shouldTransitionToFeedback(e){';
if (!str.includes(text)) {
let index = str.indexOf('}shouldTransitionToFeedback(');
index > 0 && (index = PatcherUtils.indexOf(str, '}){', index, 200, true));
if (index < 0) {
return false;
}
str = str.replace(text, text + 'return !1;');
str = PatcherUtils.insertAt(str, index, 'return !1;');
return str;
},