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

A reload function would be nice #4

Closed
glancashire opened this issue Apr 14, 2020 · 2 comments · Fixed by #5
Closed

A reload function would be nice #4

glancashire opened this issue Apr 14, 2020 · 2 comments · Fixed by #5
Assignees
Labels
enhancement New feature or request

Comments

@glancashire
Copy link

Thanks again for your control.

For usage in cells the option of reloading w/o recreating would be a great addition.

I have added one via an extension (see below), but it is of course not a clean and has to be added to your source file (private access).

Kind Regard
Graham

extension CalendarHeatmap {
    public func reload() {
        DispatchQueue.global(qos: .userInteractive).async {
            DispatchQueue.main.async { [weak self] in
                // then reload
                self?.collectionView.reloadData()
                self?.scrollToEnd()
            }
        }
    }
}
@Zacharysp
Copy link
Owner

Sounds great, I will add the reload function, thank you for the advice.

@Zacharysp Zacharysp added the enhancement New feature or request label Apr 15, 2020
@Zacharysp Zacharysp self-assigned this Apr 15, 2020
@Zacharysp Zacharysp linked a pull request Apr 16, 2020 that will close this issue
@glancashire
Copy link
Author

Thank you, this solves my issue.

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

Successfully merging a pull request may close this issue.

2 participants