Skip to content

Commit 99de9d6

Browse files
authored
fix title bar on certain text previews (#35)
1 parent 4fa3bdb commit 99de9d6

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

Django Files/Views/Preview.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ struct FilePreviewView: View {
958958
.padding(.vertical, 8)
959959
.frame(maxWidth: .infinity)
960960
.background {
961-
if file.mime.starts(with: "text") {
961+
if file.mime.starts(with: "text") || file.mime.starts(with: "application") {
962962
Rectangle()
963963
.fill(.ultraThinMaterial)
964964
.ignoresSafeArea()

Django FilesUITests/Django_FilesUITests.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ final class Django_FilesUITests: XCTestCase {
3838
// Use XCTAssert and related functions to verify your tests produce the correct results.
3939
}
4040

41-
// @MainActor
42-
// func testLaunchPerformance() throws {
43-
// #if targetEnvironment(simulator)
44-
// // Skip performance testing in simulator as it's not reliable
45-
// return
46-
// #else
47-
// if #available(iOS 18.0, *) {
48-
// // This measures how long it takes to launch your application.
49-
// measure(metrics: [XCTApplicationLaunchMetric()]) {
50-
// XCUIApplication().launch()
51-
// }
52-
// }
53-
// #endif
54-
// }
41+
@MainActor
42+
func testLaunchPerformance() throws {
43+
#if targetEnvironment(simulator)
44+
// Skip performance testing in simulator as it's not reliable
45+
return
46+
#else
47+
if #available(iOS 18.0, *) {
48+
// This measures how long it takes to launch your application.
49+
measure(metrics: [XCTApplicationLaunchMetric()]) {
50+
XCUIApplication().launch()
51+
}
52+
}
53+
#endif
54+
}
5555
}

0 commit comments

Comments
 (0)