Skip to content

Commit

Permalink
Merge pull request #2196 from anyproto/ios-3424-investigate-logout-sc…
Browse files Browse the repository at this point in the history
…reen-issue-before-authentication

iOS-3424 Fix auth screen after logout
  • Loading branch information
ignatovv authored Oct 8, 2024
2 parents 27f3f1a + ec113e4 commit 66e3a3e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ struct ApplicationCoordinatorView: View {
.task {
await model.startFileHandler()
}
.onChange(of: dismissAllPresented) {
model.setDismissAllPresented(dismissAllPresented: $0)
}
.snackbar(toastBarData: $model.toastBarData)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import SwiftUI

struct DismissAllPresented {
struct DismissAllPresented: Equatable {

private weak var window: UIWindow?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ struct AuthBackgroundView<Content>: View where Content: View {

let url: URL?
let content: () -> Content

@State private var showContent = true

var body: some View {
GeometryReader { geo in
Expand Down Expand Up @@ -33,22 +31,17 @@ struct AuthBackgroundView<Content>: View where Content: View {
playerView(width: width, height: height)
Spacer.fixedHeight(bottomOffset)
}
.fullScreenCover(isPresented: $showContent) {
.overlay {
navigationView
}
.transaction { transaction in
transaction.disablesAnimations = true

}
}

private var navigationView: some View {
NavigationView {
NavigationStack {
content()
}
.background(TransparentBackground())
.transaction { transaction in
transaction.disablesAnimations = false
}
.disablePresentationBackground()
}

@ViewBuilder
Expand Down
2 changes: 1 addition & 1 deletion Anytype/Sources/PresentationLayer/Auth/Auth/AuthView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct AuthView: View {
.onAppear {
model.onAppear()
}
.background(TransparentBackground())
.disablePresentationBackground()
.fitIPadToReadableContentGuide()
.safariSheet(url: $safariUrl, preferredColorScheme: .dark)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct JoinFlowView: View {

Spacer.fixedHeight(14)
}
.background(TransparentBackground())
.disablePresentationBackground()
.padding(.horizontal, 16)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct LoginView: View {
content
.navigationBarBackButtonHidden(true)
.navigationBarTitleDisplayMode(.inline)
.background(TransparentBackground())
.disablePresentationBackground()
.padding(.horizontal, 16)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
Expand Down

This file was deleted.

0 comments on commit 66e3a3e

Please sign in to comment.