Skip to content

Commit

Permalink
fix(electron): mime type not always checkable in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Jan 18, 2025
1 parent 0ae5453 commit 148e166
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default class CodeMimeTypesOptions extends OptionsWidget {

async optionsLoaded(options: OptionMap) {
this.$mimeTypes.empty();
mimeTypesService.loadMimeTypes();

const ungroupedMimeTypes = Array.from(mimeTypesService.getMimeTypes());
const plainTextMimeType = ungroupedMimeTypes.shift();
Expand Down Expand Up @@ -88,8 +89,6 @@ export default class CodeMimeTypesOptions extends OptionsWidget {
});

await this.updateOption("codeNotesMimeTypes", JSON.stringify(enabledMimeTypes));

mimeTypesService.loadMimeTypes();
}

#buildSelectionForMimeType(mimeType: MimeType) {
Expand Down

0 comments on commit 148e166

Please sign in to comment.