Code review comment for lp:~andrewsomething/ubuntu-clock-app/sunrise-sunset-fixes

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Looks good. Just needs some small tweaks to help debugging in the future. I was thinking perhaps some debug output statements can be added so that a user can report the terminal output incase something is going wrong. For instance, in the saveSunTimes (date, sunRise, sunSet) function, can you add an output statement like,

Utils.log("Saving Sunrise/Sunset times to disk");

This way we can be sure that it was saved.

Also in the else case below, can you add an output statement "Retrieving sunrise/sunset times from disk".

88 + else if (status == XmlListModel.Ready) {
89 + sunriseTimeLabel.text = savedData[0][2];
90 + sunsetTimeLabel.text = savedData[0][3];
91 }

In line 22, can you replace "Default Ubuntu Touch Clock" with "Sunrise and Sunset Database"

22 + db = LocalStorage.openDatabaseSync("ubuntu-clock-app", "0.1", "Default Ubuntu touch clock", 1000);

In line 33, can you change that to "Error creating table in Sunrise/Sunset database".

33 + Utils.error("Error creating table in db: " + err);

review: Needs Fixing

« Back to merge proposal