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

Publishing changes from within view updates is not allowed, this will cause undefined behavior. #52

Open
adisve opened this issue Jan 26, 2023 · 1 comment

Comments

@adisve
Copy link

adisve commented Jan 26, 2023

Occurs when scrolling to new months

@doodahdayz
Copy link

doodahdayz commented Oct 4, 2023

I get the same error in meh apps I tried running the Examples code and am seeing the same message in the console when scrolls to a new month. I used the ExampleMonthlyCalendarView example to reproduce it.

The issue seems to be ElegantListManager

This is an issue in the ElegantListManager class.. Specifically the problem is the in reloadPages() function.
The fix for this is to modify this function using DispatchQueue.main.async wrapper... This will fix this issue for the MonthlyCalendarView class...

What I know about GIT is next to nothing... so I have no reference to do a pull and get this fix up there... but again.. its not in the calendar code, but in the underlying ElegantListManager

public func reloadPages() {
    DispatchQueue.main.async {
    	self.currentPage = (self.currentPage.index, .scroll(animated: false))
    }
}

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

2 participants