fixed race condition on delete item
This commit is contained in:
parent
9673df02b1
commit
3c07bdcbbf
4 changed files with 15 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "com.monkeystew.todotxtenyo.beta",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"vendor": "Monkeystew",
|
||||
"type": "web",
|
||||
"main": "index.html",
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
appInstance.renderInto(document.body);
|
||||
</script>
|
||||
<div id="history" style="display: none">
|
||||
<div class="version">0.1.1</div>
|
||||
<ul>
|
||||
<li>Bugfix: race condition when deleting certain entries.</li>
|
||||
</ul>
|
||||
<div class="version">0.1.0</div>
|
||||
<ul>
|
||||
<li>Initial open source and beta release.</li>
|
||||
|
|
|
@ -140,7 +140,15 @@ enyo.kind({
|
|||
todoTap: function(inSender, inEvent) {
|
||||
this.selectedIndex = inEvent.rowIndex;
|
||||
if (this.selectedIndex != undefined) {
|
||||
this.selectedId = this.sortedList[this.selectedIndex].num-1;
|
||||
//this.selectedId = this.sortedList[this.selectedIndex].num-1;
|
||||
var num = this.sortedList[this.selectedIndex].num;
|
||||
function getIdx(list, num) {
|
||||
for (var i=0; i<list.length; i++) {
|
||||
if (list[i].num == num)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
this.selectedId = getIdx(this.owner.todoList,num);
|
||||
}
|
||||
var r = this.sortedList[inEvent.rowIndex];
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"package_format_version": 2,
|
||||
"loc_name": "Todo.txt Enyo",
|
||||
"icon": "icon.png",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"vendor": "Monkeystew",
|
||||
"app": "com.monkeystew.todotxtenyo.beta",
|
||||
"services": ["com.monkeystew.todotxtenyo.beta.service"]
|
||||
|
|
Loading…
Reference in a new issue