-
Notifications
You must be signed in to change notification settings - Fork 838
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
Workaround for off-screen draw bug in XF4.5+ #1447
Conversation
@mportune-bw , please create a tracking item in Asana for this assigned to yourself with a due date for say, 15 days, hopefully someone on the Xamarin team fixes this soon, but perhaps a reminder on the calendar every 15 days to follow up and a task in Asana to keep track of it would be worthwhile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is okay, just one quick question
@@ -798,15 +802,32 @@ private void OrganizationChanged() | |||
} | |||
if (Cipher.OrganizationId != null) | |||
{ | |||
HasCollections = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is forced true
instead of using cols.Any()
due to the drawing issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, though you're correct I should be using cols.Any()
in case the org has no collections. I just need to do it here (before cols
is applied to the RepeaterView
to make sure the view is visible before modifying data). Good catch, stand by for update...
An issue where a BindableLayout that is modified off-screen isn't re-drawn to reflect the modification (Xamarin Forms 4.5+) broke the way we render organization & collection selection when adding new vault items. This PR works around that in an interesting way.
HasCollections
is set totrue
in order to make the layout visible before modifying the contentCollections
is updated with the new content, it is set to a new instance ofExtendedObservableCollection
containing the values already established inResetWithRange
(which must still occur or this has no effect)RepeaterView.ItemsSource
is repeatedly set toCollections
(limited by a timer to prevent scroll events from max'ing out the thread pool)Things to consider:
Note to my future self: Please for the love of ham, revert this when that bug is fixed