Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status bar change to light content after Toast dismissed #39

Open
2 tasks done
thomas-gogox opened this issue Aug 12, 2024 · 2 comments
Open
2 tasks done

Status bar change to light content after Toast dismissed #39

thomas-gogox opened this issue Aug 12, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@thomas-gogox
Copy link

Pre-requisites:

  • Yes, I looked through both open and closed issues looking for what I needed.
  • No, I did not find what I was looking for.

Expected Behavior

The status bar color scheme should not be changed after toast dismissed

Current Behavior

The status bar is in dark content when the app is running on dark mode with a light background.
When the toast is shown, the status bar changes to light content

Steps to Reproduce

Simulator.Screen.Recording.-.iPhone.XR.-.2024-08-12.at.15.22.52.mp4
struct TestView: View {
    @State private var isLoading: Bool = false
    var body: some View {
        VStack {
            Button {
                isLoading = true
            } label: {
                Text("Hello World")
                    .padding()
            }
        }
        .toast(isPresented: $isLoading, dismissAfter: 2) {
            ToastView("Loading").toastViewStyle(.indeterminate)
        }
        .frame(
            minWidth: 0,
            maxWidth: .infinity,
            minHeight: 0,
            maxHeight: .infinity,
            alignment: .topLeading
        )
        .background(Color.white.ignoresSafeArea())
        .preferredColorScheme(.dark)
    }
}

Context

I want to keep the status bar color scheme after toast was dismissed.

Your Environment

  • Swift Version: 5
  • Xcode Version: 15.3
  • Operating System Version: 14.3.1
  • Device or Simulator: iOS 16 (dark mode)
@thomas-gogox thomas-gogox added bug Something isn't working help wanted Extra attention is needed labels Aug 12, 2024
@thomas-gogox thomas-gogox changed the title Status bar change to darkContent Status bar change to light content after Toast dismissed Aug 12, 2024
@quanshousio
Copy link
Owner

Hi @thomas-gogox,

Thank you for your detailed report. I will look into this. Could you please confirm whether you are using the latest ToastUI version 4.0.0?

@mthuong
Copy link

mthuong commented Aug 15, 2024

Hi @thomas-gogox,

Thank you for your detailed report. I will look into this. Could you please confirm whether you are using the latest ToastUI version 4.0.0?

I'm using the latest ToastUI version 4.0.0 @quanshousio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants