Skip to content

Issue 1640 - Login preference strings and username check#42

Merged
flerda merged 1 commit intoflerda:v2.1-devfrom
hssm:Issue1640
Jan 30, 2013
Merged

Issue 1640 - Login preference strings and username check#42
flerda merged 1 commit intoflerda:v2.1-devfrom
hssm:Issue1640

Conversation

@hssm
Copy link
Copy Markdown

@hssm hssm commented Jan 30, 2013

As discussed, changed login strings and check for username instead of hkey.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Generally it is better to use TextUtils.isEmpty for these kind of checks.
It takes care of nulls for you (just in case).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the tip. I'll update that.

@hssm
Copy link
Copy Markdown
Author

hssm commented Jan 30, 2013

I've updated it to use TextUtils.isEmpty. After a bit of thought, I prefer keeping "Not logged in". It's direct and explains its purpose well enough.

@ghost ghost assigned flerda Jan 30, 2013
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Sorry for being pedantic!
I think this is an activity, so instead of getting the Resources you can just call getString().
Also getString() takes formatting arguments, so there should be no need for String.format().

Something like:

  syncAccount.setSummary(getString(R.string.sync_account_summ_logged_in, username));

should just work, but I do not have the code handy to try it out.

If it does not work, just let me know and let's leave it as is.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It works. I've updated it.

@flerda
Copy link
Copy Markdown
Owner

flerda commented Jan 30, 2013

Cool, thanks a lot!

flerda added a commit that referenced this pull request Jan 30, 2013
Issue 1640 - Login preference strings and username check
@flerda flerda merged commit 3b0fcb5 into flerda:v2.1-dev Jan 30, 2013
@hssm hssm deleted the Issue1640 branch February 8, 2013 08:54
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.

2 participants