Skip to content

Replace livedata with stateflow in camera uploads screens#3593

Merged
abelgardep merged 1 commit intomasterfrom
improvement/replace_livedata_with_stateflow
Apr 25, 2022
Merged

Replace livedata with stateflow in camera uploads screens#3593
abelgardep merged 1 commit intomasterfrom
improvement/replace_livedata_with_stateflow

Conversation

@abelgardep
Copy link
Copy Markdown
Contributor

POC to start using StateFlow instead of LiveData. Several benefits including null safety.

repeatOnLifecycle API available since lifecycle-runtime-ktx 2.4.0, so we need to merge #3512 first


QA

@abelgardep abelgardep self-assigned this Mar 29, 2022
@fesave fesave force-pushed the api31 branch 3 times, most recently from 648b726 to 9077afc Compare April 6, 2022 10:48
Base automatically changed from api31 to master April 7, 2022 10:33
@abelgardep abelgardep force-pushed the improvement/replace_livedata_with_stateflow branch 2 times, most recently from cb34a5f to b835454 Compare April 11, 2022 07:55
@abelgardep abelgardep force-pushed the improvement/replace_livedata_with_stateflow branch from b835454 to 0be6eb4 Compare April 20, 2022 06:26
@abelgardep abelgardep marked this pull request as ready for review April 20, 2022 06:31
@abelgardep abelgardep requested a review from fesave April 20, 2022 06:31
Copy link
Copy Markdown
Contributor

@fesave fesave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent improvement, this is the way 💪🏻 . LGTM

Copy link
Copy Markdown
Contributor

@theScrabi theScrabi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jesmrec
Copy link
Copy Markdown
Contributor

jesmrec commented Apr 22, 2022

Some tests regarding camera uploads. Target is observing different folders for both photo and video upload.

  1. Upload photo (built-in) and video (built-in) with built-in camera. Everything uploaded ✅
  2. Upload photo (opencamera) and video (built-in) with opencamera. Only photos uploaded ✅
  3. Upload photo (opencamera) and video(opencamera) with opencamera. Everything uploaded ✅
  4. Upload photo (opencamera) and video (built-in) with built-in camera. Only videos uploaded ✅

@jesmrec
Copy link
Copy Markdown
Contributor

jesmrec commented Apr 25, 2022

also, checked how the values are observed in the UI for auto uploads videos and pictures:

  • Account to upload
  • Upload Path
  • Camera folder
  • Behaviour
  • Last sync date
  • Uploads via wifi
  • Uploads charging

@jesmrec
Copy link
Copy Markdown
Contributor

jesmrec commented Apr 25, 2022

It's approved on my side

@jesmrec jesmrec added this to the 2.21-current milestone Apr 25, 2022
@abelgardep abelgardep force-pushed the improvement/replace_livedata_with_stateflow branch from 0be6eb4 to 5497af0 Compare April 25, 2022 08:41
@abelgardep abelgardep merged commit 6e00bd1 into master Apr 25, 2022
@abelgardep abelgardep deleted the improvement/replace_livedata_with_stateflow branch April 25, 2022 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants