Navigation Menu

Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Adds UI/viewmodel code to background kotlin sample #228

Merged
merged 6 commits into from Mar 24, 2020

Conversation

codingjeremy
Copy link
Contributor

No description provided.

@codingjeremy
Copy link
Contributor Author

Hi all,

Looks like you might not have started a review of this (which is totally ok). :)

I'm going to add another commit that moves further into data binding (removes more code from Fragment), so you can wait on a starting the review. Feel free to submit comments if you already had them.

Otherwise, I will remove you as reviewers and add you back when I have that commit submitted.

Thanks!

-Jeremy

Copy link

@florina-muntenescu florina-muntenescu left a comment

Choose a reason for hiding this comment

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

small changes. once they're done feel free to merge it

LocationUpdatesBackgroundKotlin/README.md Outdated Show resolved Hide resolved
if (intent.action == ACTION_PROCESS_UPDATES) {
val result = LocationResult.extractResult(intent)
if (result != null) {
for (location in result.locations) {

Choose a reason for hiding this comment

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

result.locations.foreach...

also consider using LocationResult.extractResult(intent).apply{ ... }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched!

I used let instead for the null check, which I think is what you meant? I only ever use apply for object configuration... but you probably have a jedi way for using it, so I will followup and fix in next PR if that is the case. :)

Copy link
Contributor Author

@codingjeremy codingjeremy left a comment

Choose a reason for hiding this comment

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

Addressed all Florina's comments.

LocationUpdatesBackgroundKotlin/README.md Outdated Show resolved Hide resolved
if (intent.action == ACTION_PROCESS_UPDATES) {
val result = LocationResult.extractResult(intent)
if (result != null) {
for (location in result.locations) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched!

I used let instead for the null check, which I think is what you meant? I only ever use apply for object configuration... but you probably have a jedi way for using it, so I will followup and fix in next PR if that is the case. :)

@codingjeremy codingjeremy merged commit 0f50f86 into master Mar 24, 2020
@codingjeremy codingjeremy deleted the ui-viewmodels branch March 24, 2020 01:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants