Migrate activities to ViewPager2#152
Merged
samfundev merged 1 commit intotwireapp:masterfrom Dec 19, 2020
Merged
Conversation
38aa69c to
311feb4
Compare
Collaborator
|
Sorry, I wanted to make this clear because I forgot to say this when this was originally posted. I plan on going with road 2 and I'll try to fix the two bugs when I can. |
Contributor
Author
|
@samfundev Alright, thanks! |
9e09676 to
b24a6be
Compare
Contributor
Author
|
@samfundev Just a heads-up: I've rebased the commits onto the latest upstream, and separated the activity and fragment migrations into different commits. |
b24a6be to
80deda9
Compare
80deda9 to
e998b7e
Compare
Contributor
Author
|
@samfundev I have created a separate pull request for the ChatFragment so that the activities aren't being held up. For all intents and purposes, this is now good to merge. |
Collaborator
|
@TacoTheDank Great idea! I'll merge this in. Much appreciated. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Yes, the holy viewpager2 migration. But first, some problems.
Before we begin, the migrated channel and search activities work perfectly fine. Those have no issues.
However, the chat fragment has two bugs that need to be fixed. Both bugs have to do with the emotes.
The first came with the migration (likely due to a coding mistake of some sort). The second one has already existed but became much more obvious after the migration due to a behavior change that probably comes with viewpager2. I don't really know how to fix either of these bugs.
Bug 1 (new bug, and you will see it plain as day): OH GOD THE UNICODE EMOJI TAB IS MISSING. Well, yes but no. Swipe to it (or tap on where the icon would be), and the tab icon will load. I can't seem to find any reason why the other tabs color just fine, yet the unicode emoji tab won't. If you turn on the dark modes, you will find that the unicode emoji tab icon is plain white while the others are correctly tinted. Apparently this specific tab just doesn't tint correctly until you swipe to or tap on it, and then it's fine afterward (unless you exit the stream and go back in again, then you have to do it over again).
(Funny thing about bug 1: it was actually much worse, with none showing until swiping or tapping on them, but I managed to fix that by moving the for loop into the TabLayoutMediator.)
Bug 2 (existing bug): First, test your existing 2.9.0 stable F-Droid release version, and go to a random current stream. You should be able to reproduce this behavior (watch the whole thing). Now test the APK I've attached below and try the same thing. You will quickly see that the already unwanted behavior has changed for the worse: now you won't be able to scroll to the bottom because it jumps. One should be able to scroll completely up and down without any sort of stopping before the end of the list.
Here's an APK so you can see this migration in action for yourself (remember to check out the channel and search activity tabs, as those have been migrated to viewpager2): app-debug.zip
There are several roads to take:
1.) This can be merged just as-is, and bug fixes can be made in following commits.
2.) I always allow edits by maintainers, so bug fixes can be committed to this PR.
Either way, these bugs should probably be fixed before the next release.