mirror of
https://github.com/Aminark/legado-ios.git
synced 2026-10-23 12:21:23 +08:00
fix(import): 修复本地 TXT 文件选择与导入
- 书架和文件管理统一使用 TXT 文件选择器,支持大小写扩展名及多选,排除 JSON 书源 - 保留所选文件访问权限至异步导入完成,等待选择器关闭后展示导入确认 - 补充双入口文件选择回归、导入校验和 TXT 测试样本
This commit is contained in:
@@ -19,6 +19,10 @@ final class FixtureAppDelegate: UIResponder, UIApplicationDelegate {
|
||||
try? data.write(to: documents.appendingPathComponent(name), options: .atomic)
|
||||
}
|
||||
}
|
||||
for name in ["TXT-Book.txt", "TXT-Uppercase.TXT"] {
|
||||
try? Data("第一章 开始\n这是用于验证本地 TXT 导入的小说正文。\n第二章 后续\n正文继续。".utf8)
|
||||
.write(to: documents.appendingPathComponent(name), options: .atomic)
|
||||
}
|
||||
let controller = UIViewController()
|
||||
controller.view.backgroundColor = .systemBackground
|
||||
let label = UILabel()
|
||||
|
||||
Reference in New Issue
Block a user