Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
I really should test my tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
reisxd committed Jul 27, 2022
1 parent f8550d9 commit bb33764
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ui/patchesScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ function patchesScreen (selectedPatches, ui, variables, widgetsArray, pkg) {
widgetsArray = [listWidget, continueButton];
listWidget.setObjectName('items');
let excludedPatchList = [];
let patchesList = fs.readFileSync('./excludedPatchesList.json').toString();
patchesList = JSON.parse(patchesList);
let patchesList;
if (fs.existsSync('./excludedPatchesList.json')) {
patchesList = fs.readFileSync('./excludedPatchesList.json').toString();
patchesList = JSON.parse(patchesList);
} else {
patchesList = [];
}
excludedPatchList = patchesList;
continueButton.addEventListener('clicked', async () => {
const { errorScreen, useOldApkScreen } = require('./index.js');
Expand Down Expand Up @@ -112,6 +117,8 @@ function patchesScreen (selectedPatches, ui, variables, widgetsArray, pkg) {
if (fs.existsSync('./excludedPatchesList.json')) {
excludedPatches = fs.readFileSync('./excludedPatchesList.json');
excludedPatches = JSON.parse(excludedPatches);
} else {
fs.writeFileSync('./excludedPatchesList.json', '[]');
}
const patchItem = new QListWidgetItem();
patchItem.setText(patch);
Expand Down

0 comments on commit bb33764

Please sign in to comment.