Bug 823370 - [FTU] Hit Import SIM contacts multiple time will create dup... #7107

Merged
merged 1 commit into from Jan 7, 2013

Conversation

Projects
None yet
2 participants
Contributor

jmcanterafonseca commented Dec 20, 2012

...licate contacts

apps/communications/ftu/js/ui.js
@@ -217,6 +218,7 @@ var UIManager = {
feedbackMessage.innerHTML = _('simContacts-reading');
}, function(n) {
feedbackMessage.innerHTML = _('simContacts-imported3', {n: n});
+ self.simImportButton.setAttribute('aria-disabled','true');
@fcampo

fcampo Dec 20, 2012

Contributor

wouldn't be better to call it when the importing started, instead of waiting till it finishes?

Do we manage multiple clicks while the process is ongoing?

EDIT: I checked the patch and if pressed repeteadly while importing, it import the contacts as many times as button pressed. I still think it's better to disable the button while importing, and enable it (or not) again depending on the result.

Contributor

jmcanterafonseca commented Jan 3, 2013

I have rebased it and implemented the suggested comments. The only discrepancy is that when there is an error the button is enabled again as that could be a temporary error, or the user could take action to fix it, so it makes more sense IMHO to re-enable the button.

Contributor

fcampo commented Jan 7, 2013

thanks for fixing it Jose, revised and tested. r=me

jmcanterafonseca added a commit that referenced this pull request Jan 7, 2013

Merge pull request #7107 from jmcanterafonseca/fix_import_sim
Bug 823370 - [FTU] Hit Import SIM contacts multiple time will create dup...

@jmcanterafonseca jmcanterafonseca merged commit 1172f87 into mozilla-b2g:master Jan 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment