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

Notification Expiration doesn't work on iOS #14516

Closed
ClayYahuira opened this issue Feb 6, 2024 · 3 comments
Closed

Notification Expiration doesn't work on iOS #14516

ClayYahuira opened this issue Feb 6, 2024 · 3 comments
Labels

Comments

@ClayYahuira
Copy link

ClayYahuira commented Feb 6, 2024

Describe the bug

Notification expiration TimeSpan is not working on iOS.

To Reproduce

Steps to reproduce the behavior:

  1. SetUp the WindowNotificationManager
  2. Create a simple notification with the default Expiration.
  3. Show the Notification.
  4. The Notification doesn't disappear in 5 seconds(default).

Expected behavior

The notification should hide like on desktop or android after the expiration time.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • OS: iOS
  • Avalonia-Version: 11.0.6

Additional context

This is how I set up the NotificationService:

public void Initialize(object? visual)
        {
            var topLevel = TopLevel.GetTopLevel(visual as Visual);
            _windowNotificationManager = new WindowNotificationManager(topLevel)
            {
                Position = NotificationPosition.BottomRight,
                MaxItems = 1,
            };
        }

How I create my notification:

public object GetComingSoonNotification()
        {
            return new Notification(
                title: string.Empty,
                message: _languageService.GetResourceFromName(COMING_SOON_MESSAGE));
        }

How I show the notification:

public async Task ShowNotification(object? notification)
        {
            if (notification is INotification notificationObject)
            {
                    _windowNotificationManager?.Show(notificationObject);
            }
        }

This same code is working well on android but on iOS the Expiration is not applying and I need to tap over any kind of button in order to hide the notification.

@ClayYahuira ClayYahuira added the bug label Feb 6, 2024
@jp2masa
Copy link
Contributor

jp2masa commented Feb 6, 2024

Probably fixed by #13942, try upgrading to 11.0.7.

@maxkatz6
Copy link
Member

maxkatz6 commented Feb 6, 2024

Yes, it was fixed in 11.0.7

@maxkatz6 maxkatz6 closed this as completed Feb 6, 2024
@ClayYahuira
Copy link
Author

I tried with the 11.0.7 and the bug was solved. Nice job 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants