-
Notifications
You must be signed in to change notification settings - Fork 0
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
Organize all files into core and ecom packages #247
Organize all files into core and ecom packages #247
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @devinmorgan and the rest of your teammates on Graphite |
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @devinmorgan and the rest of your teammates on Graphite |
219ce40
to
dff9a5f
Compare
a9c23d4
to
6458699
Compare
dff9a5f
to
be479a9
Compare
6458699
to
1772e21
Compare
// This extension splits the path by "/" and adds each segment individually to the path. | ||
// This is to prevent the URL from getting corrupted through internal OKHttp URL encoding. | ||
internal fun HttpUrl.Builder.addPathSegmentsSafe(path: String): HttpUrl.Builder { | ||
path.split("/").forEach { segment -> | ||
if (segment.isNotEmpty()) { | ||
this.addPathSegment(segment) | ||
} | ||
} | ||
return this | ||
} | ||
|
||
/** | ||
* [JSONObject.optString] has trouble falling back to `null` and seems to fallback to `"null"` (string) instead | ||
*/ | ||
internal fun JSONObject.getStringOrNull(fieldName: String): String? { | ||
if (!has(fieldName) || isNull(fieldName)) { | ||
return null | ||
} | ||
return optString(fieldName) | ||
} | ||
|
||
internal fun JSONObject.hasNonNull(fieldName: String): Boolean { | ||
return has(fieldName) && !isNull(fieldName) | ||
} |
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.
Moved forage.android.Utils.kt
to forage.android.core.services.Utils.kt
The second step in the public ecommerce repo that needs to take place in order to make sharing code between the private pos repo and this repo pain free; all while allowing for both repos to evolve independently Signed-off-by: Devin Morgan <[email protected]>
be479a9
to
0bb7834
Compare
1772e21
to
ee43184
Compare
As discussed in the rollout planning, I merged #248 directly into |
What
Step 2 of Part 1.
Why
See here
Test Plan
Demo
N/A - no new functionality
How
This PR will not get merged into
main.
I am leaving it open to make it easier for folks to review the code changes in the whole stack. I will end up pointing #248 tomain
and merging that in. I will close this PR and #246 once folks have approved the stack. See here for more detail.