8000 [🧽🐨] NT-926 Koala clean up by eoji · Pull Request #759 · kickstarter/android-oss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[🧽🐨] NT-926 Koala clean up #759

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

Merged
merged 2 commits into from
Feb 25, 2020
Merged

[🧽🐨] NT-926 Koala clean up #759

merged 2 commits into from
Feb 25, 2020

Conversation

eoji
Copy link
Contributor
@eoji eoji commented Feb 24, 2020

📲 What

Lil Koala refactor, my next mix tape.

🤔 Why

We're about to hit the 800 line limit in Koala.java so I cleaned it up.

🛠 How

  • Added helper method KoalaUtils.refTagProperties for setting the "session_ref_tag" and "session_referrer_credit" properties.
  • Removed all unused methods in Koala.java
    • trackFacebookLoginSuccess
    • trackCheckoutNext
    • trackCheckoutCancel
    • trackCheckoutLoadFailed
    • trackCheckoutCancelShareSheet
    • trackCheckoutShareFinished
    • trackCancelProjectShareSheet
    • trackShowProjectFacebookShareView
    • trackShowProjectTwitterShareView
    • trackProjectFacebookShare
    • trackProjectTwitterShare

👀 See

image

📋 QA

The tests are passing™.

Story 📖

NT-926

eoji added 2 commits February 24, 2020 11:41
Moved RefTag properties to helper method in KoalaUtils.
@@ -226,6 +218,20 @@ private KoalaUtils() {}
return MapUtils.prefixKeys(properties, prefix);
}

public static @NonNull Map<String, Object> refTagProperties(final @Nullable RefTag intentRefTag, final @Nullable RefTag cookieRefTag) {
return new HashMap<String, Object>() {
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need this extra bracket?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! It's the init block of the HashMap

@eoji eoji merged commit 6d4ee8a into master Feb 25, 2020
@eoji eoji deleted the clean-up-koala branch February 25, 2020 15:19
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.

2 participants
0