diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5909337..aa2a167 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,19 @@ open: **a second build under the same version goes under the already cut
heading, not back under `Unreleased`.** Date the heading and add its compare link
once the version tag exists.
+## [Unreleased]
+
+### Added
+
+- A zip file opens and lists what is inside. Tapping an entry shows it.
+- Photos and text files the reader used to refuse now open.
+
+### Changed
+
+- A file that will not open says so, and offers to write to us when something
+ went wrong on our side.
+- The app no longer offers itself for music and films.
+
## [1.42]
### Added
diff --git a/OpenDocumentReader/Constants.swift b/OpenDocumentReader/Constants.swift
index 6a556ce..76abbfa 100644
--- a/OpenDocumentReader/Constants.swift
+++ b/OpenDocumentReader/Constants.swift
@@ -12,6 +12,9 @@ enum Constants {
/// Which of the house ad's rotations comes next.
static let key_house_ad_index = "houseAdIndex"
+ /// The address the "file will not open" message names.
+ static let supportEmail = "support@opendocument.app"
+
/// ODR Pro on the App Store. This is the *paid* app: on iOS that is `at.tomtasche.reader`,
/// while on Android the same bundle id names the free one.
static let proAppStoreId = 1_452_061_743
diff --git a/OpenDocumentReader/CoreWrapper.swift b/OpenDocumentReader/CoreWrapper.swift
index f59f59a..334658b 100644
--- a/OpenDocumentReader/CoreWrapper.swift
+++ b/OpenDocumentReader/CoreWrapper.swift
@@ -77,14 +77,13 @@ private func selectViews(_ views: [HtmlView], _ documentType: DocumentType) -> [
}
}
-/// A csv is a *text* file to odrcore that also loads as a spreadsheet, so it
-/// answers `isDocumentFile` with false and `asDocumentFile()` fails on it.
-private func isCsv(_ file: DecodedFile) -> Bool { file.fileType == .commaSeparatedValues }
-
@objc final class CoreWrapper: NSObject {
@objc private(set) var pageNames: [String] = []
@objc private(set) var pageURLs: [URL] = []
+ /// Whether odrcore saw only a container, so the page is a listing of what is inside it.
+ @objc private(set) var isArchive = false
+
/// Whether `backTranslate` has a document to apply an edit to. Only a
/// document that said it takes one is kept, so having it *is* the answer.
@objc var isEditable: Bool { lock.withLock { document != nil } }
@@ -105,6 +104,7 @@ private func isCsv(_ file: DecodedFile) -> Bool { file.fileType == .commaSeparat
pageNames = []
pageURLs = []
document = nil
+ isArchive = false
let fileTypes = (try? DecodedFile.listFileTypes(path: inputPath)) ?? []
guard !fileTypes.isEmpty else {
@@ -126,11 +126,14 @@ private func isCsv(_ file: DecodedFile) -> Bool { file.fileType == .commaSeparat
}
}
- // odrcore also translates images, media and fonts, but only into an
- // `
` or a `