| 750 | const folderTags = getOpenBogusFolders(); | 750 | const folderTags = getOpenBogusFolders(); |
| 751 | | 751 | |
| 752 | // Choose the setting for this dialog. If from settings, verify the setting really exists, otherwise take "ASK". | 752 | // Choose the setting for this dialog. If from settings, verify the setting really exists, otherwise take "ASK". |
| 753 | const setting = forceShow ? tag_import_setting.ASK | 753 | let setting; |
| 754 | : importAll ? tag_import_setting.ALL | 754 | if (forceShow) { |
| 755 | : importExisting ? tag_import_setting.ONLY_EXISTING | 755 | setting = tag_import_setting.ASK; |
| 756 | : Object.values(tag_import_setting).find(setting => setting === power_user.tag_import_setting) ?? tag_import_setting.ASK; | 756 | } else if (importAll) { |
| | 757 | setting = tag_import_setting.ALL; |
| | 758 | } else if (importExisting) { |
| | 759 | setting = tag_import_setting.ONLY_EXISTING; |
| | 760 | } else { |
| | 761 | setting = Object.values(tag_import_setting).find(setting => setting === power_user.tag_import_setting) ?? tag_import_setting.ASK; |
| | 762 | } |
| 757 | | 763 | |
| 758 | switch (setting) { | 764 | switch (setting) { |
| 759 | case tag_import_setting.ALL: | 765 | case tag_import_setting.ALL: |