From 53d46c3bf7c31225788e86117b02d4f396f4d237 Mon Sep 17 00:00:00 2001 From: Undefined Date: Thu, 10 Oct 2024 07:05:07 +0800 Subject: [PATCH] fix iOS14 custom import --- .../MainInterface/CustomFontsScene.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/WDBFontOverwrite/MainInterface/CustomFontsScene.swift b/WDBFontOverwrite/MainInterface/CustomFontsScene.swift index f53a265..da1ea87 100644 --- a/WDBFontOverwrite/MainInterface/CustomFontsScene.swift +++ b/WDBFontOverwrite/MainInterface/CustomFontsScene.swift @@ -32,15 +32,6 @@ struct CustomFontsScene: View { .navigationTitle("Custom") } .navigationViewStyle(.stack) - .sheet(isPresented: $viewModel.importPresented) { - DocumentPicker( - importType: viewModel.selectedCustomFontType, - ttcRepackMode: viewModel.importTTCRepackMode - ) - } - .sheet(isPresented: $viewModel.isPresentedFileEditor) { - FileEditorView() - } .onAppear { Task(priority: .background) { do { @@ -73,6 +64,12 @@ struct CustomFontsScene: View { text: "Import custom \(viewModel.selectedCustomFontType.rawValue)" ) } + .sheet(isPresented: $viewModel.importPresented) { + DocumentPicker( + importType: viewModel.selectedCustomFontType, + ttcRepackMode: viewModel.importTTCRepackMode + ) + } Button { progressManager.isBusy = true progressManager.message = "Running" @@ -100,6 +97,9 @@ struct CustomFontsScene: View { text: "Manage imported fonts" ) } + .sheet(isPresented: $viewModel.isPresentedFileEditor) { + FileEditorView() + } ActionButtons() } header: { Text("Actions")