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

Can you add a function to display priority based on weight? #523

Closed
AllLuckly opened this issue Jul 18, 2023 · 9 comments
Closed

Can you add a function to display priority based on weight? #523

AllLuckly opened this issue Jul 18, 2023 · 9 comments

Comments

@AllLuckly
Copy link

Can you add a function to display priority based on weight? For example, what I am showing now is a pop-up window with low priority. When another pop-up window with high priority arrives, if the user does not perform any operation, we will automatically hide the pop-up window with low weight, and then display the pop-up window with high priority. window, when the user finishes operating the high-priority pop-up window, the low-priority pop-up window will pop up.

@wtmoose
Copy link
Member

wtmoose commented Jul 19, 2023

I don't see this feature having broad appeal and I unfortunately don't have time to do custom work for individual projects.

Here's my suggestion:

  1. Have two SwiftMessages instances, one for low priority messages and another for high priority messages.
  2. Present messages at varying window levels, e.g. low priority messages at .normal level and high priority at .alert level, using the presentationContext = .window(...) config setting.

High priority messages will cover lower priority messages. When the higher priority message is hidden, any remaining lower priority messages will be revealed.

@AllLuckly
Copy link
Author

Thank you for your reply, I have already written the relevant functions, are you willing to accept my pull requests?

@wtmoose
Copy link
Member

wtmoose commented Jul 22, 2023

Unlikely, but I’ll look at it

@Coder-Miao
Copy link

I think most scenarios need to set the priority of the box, which is throughout the entire app life cycle. I think future versions can add this configuration, which will gain more recognition and love from developers.

@liyunxin
Copy link

I agree with Coder-Miao!

1 similar comment
@Jacky-LinPeng
Copy link
Contributor

I agree with Coder-Miao!

@Jacky-LinPeng
Copy link
Contributor

Thank you for your reply, I have already written the relevant functions, are you willing to accept my pull requests?

已经实现优先级能力啦?开放出来共享不

@Jacky-LinPeng
Copy link
Contributor

I agree with Coder-Miao!

@wtmoose
Copy link
Member

wtmoose commented Sep 23, 2024

10.0.1

@wtmoose wtmoose closed this as completed Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants