Closed Bug 1016179 Opened 10 years ago Closed 10 years ago

[Keyboard] Correct Promise usage and some API changes

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S3 (6june)

People

(Reporter: timdream, Assigned: timdream)

References

Details

(Whiteboard: [p=1])

Attachments

(1 file)

In bug 1013155 I made mistakes on using Promise and use promise callbacks to resolve another promise. I should have use p.then() to create the new promise (which resolves to the values return by callbacks in then().

See http://promisesaplus.com/#the__method

I also made a few API changes in my functions so they are more consistent. The end result is less code and less "if" and less scenario to test. :)
Attachment #8429039 - Flags: review?(rlu)
Depends on: 1013155
Target Milestone: --- → 2.0 S3 (6june)
Comment on attachment 8429039 [details]
mozilla-b2g:master PR#19663

r=me with some suggestions logged on the pull request.
Thank you.
Attachment #8429039 - Flags: review?(rlu) → review+
Let's improve that in the next bug maybe.

master: https://github.com/mozilla-b2g/gaia/commit/314c602dce1d5860a96ec54f217116400628a455
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: