Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions iOSClient/GUI/Lucid Banner/UploadBannerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,23 @@ func showUploadBanner(scene: UIWindowScene?,
if allowMinimizeOnTap {
LucidBannerVariantCoordinator.shared.register(token: token) { context in
let bounds = context.bounds
let controller = SceneManager.shared.getController(scene: scene)
var height: CGFloat = 0
let over: CGFloat = 30
if let scene,
let controller,
let window = scene.windows.first {
let regularLayout = (window.rootViewController?.traitCollection.horizontalSizeClass == .regular)
let iPad = UIDevice.current.userInterfaceIdiom == .pad
if iPad, regularLayout {
height = over
} else {
height = controller.barHeightBottom + context.safeAreaInsets.bottom + over
}
let insets = context.safeAreaInsets
let trait = context.window.traitCollection
let controller = SceneManager.shared.getController(scene: context.window.windowScene)
let tabBarHeight: CGFloat = controller?.barHeightBottom ?? 0
let verticalSpacing: CGFloat
let y: CGFloat

if trait.horizontalSizeClass == .regular {
verticalSpacing = 24
y = bounds.maxY - insets.bottom - verticalSpacing
} else {
verticalSpacing = 20
y = bounds.maxY - tabBarHeight - insets.bottom - verticalSpacing
}

let point = CGPoint(
x: bounds.midX,
y: bounds.maxY - height
)

return LucidBannerVariantCoordinator.VariantResolution(
targetPoint: point,
targetPoint: CGPoint(x: bounds.midX, y: y),
payloadUpdate: .init(
horizontalLayout: .centered(width: 100),
swipeToDismiss: false,
Expand Down
3 changes: 3 additions & 0 deletions iOSClient/Networking/NCNetworkingProcess.swift
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@

await runMetadataPipelineAsync(metadatas: metadatas)

// TODO: Check temperature

Check warning on line 243 in iOSClient/Networking/NCNetworkingProcess.swift

View workflow job for this annotation

GitHub Actions / Lint

Todo Violation: TODOs should be resolved (Check temperature) (todo)

if lastUsedInterval != minInterval {
await startTimer(interval: minInterval)
Expand All @@ -252,6 +252,9 @@
// Set Live Photo
await NCNetworking.shared.setLivePhoto(account: currentAccount)

// Clear the errors
shownErrors.removeAll()

if lastUsedInterval != maxInterval {
await startTimer(interval: maxInterval)
}
Expand Down
Loading