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

Rc/update currency #345

Merged
merged 17 commits into from
Oct 8, 2018
Merged

Rc/update currency #345

merged 17 commits into from
Oct 8, 2018

Conversation

Rcureton
Copy link
Contributor

@Rcureton Rcureton commented Oct 3, 2018

What

  • User can successfully change their preferred currency from the Account Screen.
  • Added the mutation for changing your currency.
  • Added the tests for changing your currency.

See 👀

oct-03-2018 18-17-42
oct-03-2018 18-17-52

Rashad Cureton and others added 15 commits September 11, 2018 12:16
* completed screen for change email

* added proper dimens from dimens.xml

* fixed pr feedback
* added change password screen, toolbar and added style for textinputlayout

* refactored styles
* added cells for edit profile and change password

* made rows for account in settings and added account activity layout with rows

* added toolbar layout, account layout, AccountActivity, Updated SettingsNewViewModel

* added edit text and line restrictions

* re-added tests that were deleted accidentally

* fixed lines and spacing issues

* fixed imports

* fixed more imports

* moved the tests into the right package

* setup edit profile cell and added the activity

* added toolbar and imageview to edit profile

* still fixing layout

* updated strings, completed edit profile ui

* removed duplicate activity in manifest and sample layout

* fixed circle issues

* added icon for different screen mods

* fixed error

* fixed more errors

* fixed the last error
@Rcureton Rcureton requested a review from eoji October 4, 2018 14:05
@eoji
Copy link
Contributor

eoji commented Oct 4, 2018

Copy link
Contributor

@eoji eoji left a comment

Choose a reason for hiding this comment

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

Nice job but had some feedback.
Most notably is the app crashes when I open the Account screen while logged into my personal account.
Here's the error I get:

Caused by: java.lang.IllegalStateException: it must not be null
        at com.kickstarter.ui.activities.AccountActivity$onCreate$1.call(AccountActivity.kt:37)
        at com.kickstarter.ui.activities.AccountActivity$onCreate$1.call(AccountActivity.kt:23)

import kotlinx.android.synthetic.main.activity_account.*
import kotlinx.android.synthetic.main.change_password_toolbar.*
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the wrong import

getString(R.string.Currency_GBP), getString(R.string.Currency_HKD), getString(R.string.Currency_JPY),
getString(R.string.Currency_MXN), getString(R.string.Currency_NOK), getString(R.string.Currency_NZD),
getString(R.string.Currency_SEK), getString(R.string.Currency_SGD), getString(R.string.Currency_USD))
private fun setSpinnerSelection(currencyCode: String) {
Copy link
Contributor

Choose a reason for hiding this comment

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

let's alphabetize these private methods

/** Emits the current user's chosen Currency. */
fun chosenCurrency(): Observable<String>

/** Emits a string to display when network could not be found. */
Copy link
Contributor

Choose a reason for hiding this comment

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

this emits whenever there's an error

/** Emits when the progress bar should be visible. */
fun progressBarIsVisible(): Observable<Boolean>

/** Emits when the currency update was unsuccessful. */
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be when it's successful

Copy link
Contributor

@eoji eoji left a comment

Choose a reason for hiding this comment

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

After you fix the 2 comments, we're G2G 🚀

/** Emits the current user's chosen Currency. */
fun chosenCurrency(): Observable<String>

/** Emits whenever there is an error. */
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you could be a little more descriptive 😛

}

@Test
fun testError() {
Copy link
Contributor

Choose a reason for hiding this comment

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

You're not actually testing anything here.

@Rcureton Rcureton merged commit ae7aaea into master Oct 8, 2018
@Rcureton Rcureton deleted the rc/update-currency branch October 8, 2018 15:44
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.

None yet

2 participants