In rev 140 was introduct a critical bug in DB storage[1]:
the Storage.saveCalculations was designed to save all calculations when the app was closed, so the function has an argoument (calculations) that is an array with all calculations.
After rev 140 the Storage.saveCalculations is called at every tearOff, so every time all array is saved.
If I put a console.log in Storage.saveCalculations that logs every time is called and the lenght of var calculations, and I do a calc, tear off, do a calc, tear off again and close the app, in rev 139 I have:
calculationCompleted
save
calc length 2
in rev 140 I have:
calculationCompleted
save
calc length1
newPush
calculationCompleted
save
calc length2
After my changes, the calc is saved every time, but the calculations array has only last calc, so we have not multiple calc saved.
In rev 140 was introduct a critical bug in DB storage[1]: saveCalculation s was designed to save all calculations when the app was closed, so the function has an argoument (calculations) that is an array with all calculations.
the Storage.
After rev 140 the Storage. saveCalculation s is called at every tearOff, so every time all array is saved.
If I put a console.log in Storage. saveCalculation s that logs every time is called and the lenght of var calculations, and I do a calc, tear off, do a calc, tear off again and close the app, in rev 139 I have: leted
calculationComp
save
calc length 2
in rev 140 I have: leted leted
calculationComp
save
calc length1
newPush
calculationComp
save
calc length2
After my changes, the calc is saved every time, but the calculations array has only last calc, so we have not multiple calc saved.
[1]http:// bazaar. launchpad. net/~ubuntu- calculator- dev/ubuntu- calculator- app/trunk/ revision/ 140