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

Rebuild Capture G1 #474

Merged
merged 6 commits into from
Jan 22, 2021
Merged

Rebuild Capture G1 #474

merged 6 commits into from
Jan 22, 2021

Conversation

shc261392
Copy link
Contributor

  • Remove unneeded bottom margin in PostCatpureTabComponent
  • Move sharing functionality to ShareService
  • Add a fallback for sharing; if merging with sharable_copy url fails (most likely because of CORS error), catch the error and use download API instead. It's implemented as fallback since the former method does not always fails and is usually faster than the latter method.
  • Fix broken back button in SendPostCapturePage
  • PostCaptures will be re-fetched whenever the user navigated to HomePage from other pages, in addition to the re-fetching triggered by switching from CaptureTab to PostCaptureTab
  • Fix possible race conditions in PostCaptureTabComponent with messy code. All fetching are handled in a single subscription.

Use first() and untilDestroyed() to make sure the subscription
terminates after the navigation.

Zombie subscription is horrible 🧟

Signed-off-by: James Chien <[email protected]>
Refresh PostCapture whenever navigated to /home and focus on
PostCaptureTab. When the PostCaptureTab is initially created, it doesn't
need the navigation event (use startwith to force the first emitting),
so landing on home page and go to PostCaptureTab can work correctly, as
well as when the PostCaptureTab component is destoryed and re-created.

Signed-off-by: James Chien <[email protected]>
Use single observable to handle next-page data loading. The first batch
of fetching is considered as well, so all relevant race conditions
should be fixed now.

However, the code is a bit messy. Need refactoring later.

Signed-off-by: James Chien <[email protected]>
@shc261392 shc261392 requested a review from seanwu1105 January 21, 2021 10:32
@seanwu1105 seanwu1105 merged commit 584ad31 into rebuild-capture-G Jan 22, 2021
@seanwu1105 seanwu1105 deleted the rebuild-capture-G1-1 branch January 22, 2021 03:18
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

Successfully merging this pull request may close these issues.

2 participants