This repository has been archived by the owner on Dec 14, 2022. It is now read-only.
forked from maisieccino/ucl-assistant-app
Fix crash on first login & scrollToIndex crash #1031
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #1031 +/- ##
==========================================
+ Coverage 34.82% 35.59% +0.76%
==========================================
Files 159 161 +2
Lines 2435 2433 -2
Branches 645 676 +31
==========================================
+ Hits 848 866 +18
+ Misses 1572 1545 -27
- Partials 15 22 +7
Continue to review full report at Codecov.
|
shu8
force-pushed
the
shu8/start-of-year-fixes
branch
from
January 4, 2022 16:33
e1a6ffe
to
07d34e2
Compare
This fixes the crash on login when you first visit the timetable screen.
This was added in 3d7cce6#diff-92485d835e426b7a4ef0a643b8c946ff79948ad6388ef0089a9ba6907ad6562dR62 but I can't get the login to work without removing it, and the docs seem to say that isn't required. It's working on Ethan and my device with this change now.
This was happening when initialScrollIndex > 0 and the cell hadn't rendered yet. We'll now try to re-scroll after a slight delay to allow the cell to render. This also changes the behaviour of auto-scrolling so that only if you scroll into the current week will the page auto-scroll to the current day. Previously, all weeks started at the current day (e.g., today is Tuesday, scroll to next week, and the first day is still Tuesday).
shu8
force-pushed
the
shu8/start-of-year-fixes
branch
from
January 4, 2022 20:51
07d34e2
to
d3c7c04
Compare
shu8
changed the title
Fix crash on first login
Fix crash on first login & scrollToIndex crash
Jan 4, 2022
greenfrogs
approved these changes
Jan 7, 2022
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.
Looks good
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use package-lock version 2
Fix crash on login (https://sentry.io/share/issue/1c0a39f2de8847f78a51d460f1534a06/) due to all timetable entries being null
Update timetable tests
Fix scrollToIndex violation (https://sentry.io/share/issue/f183014529bf4111bfd5274797a9e7ed/) due to the
initialScrollIndex
not being rendered yetChange the behaviour of the auto-scroll to only scroll to the current day if you're viewing the current week. Previously, all weeks started at the current day (e.g., today is Tuesday, scroll to next week, and the first day was still Tuesday).
Remove trailing
/redirect
from redirect URI (it looks like it was added to fix something but it seems to work on Android and iOS without it, and the docs don't mention the need for it)Tested on iOS and Android devices.