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",
|
"id": "com.monkeystew.todotxtenyo.beta",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"vendor": "Monkeystew",
|
"vendor": "Monkeystew",
|
||||||
"type": "web",
|
"type": "web",
|
||||||
"main": "index.html",
|
"main": "index.html",
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
appInstance.renderInto(document.body);
|
appInstance.renderInto(document.body);
|
||||||
</script>
|
</script>
|
||||||
<div id="history" style="display: none">
|
<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>
|
<div class="version">0.1.0</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Initial open source and beta release.</li>
|
<li>Initial open source and beta release.</li>
|
||||||
|
|
|
@ -140,7 +140,15 @@ enyo.kind({
|
||||||
todoTap: function(inSender, inEvent) {
|
todoTap: function(inSender, inEvent) {
|
||||||
this.selectedIndex = inEvent.rowIndex;
|
this.selectedIndex = inEvent.rowIndex;
|
||||||
if (this.selectedIndex != undefined) {
|
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];
|
var r = this.sortedList[inEvent.rowIndex];
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"package_format_version": 2,
|
"package_format_version": 2,
|
||||||
"loc_name": "Todo.txt Enyo",
|
"loc_name": "Todo.txt Enyo",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"vendor": "Monkeystew",
|
"vendor": "Monkeystew",
|
||||||
"app": "com.monkeystew.todotxtenyo.beta",
|
"app": "com.monkeystew.todotxtenyo.beta",
|
||||||
"services": ["com.monkeystew.todotxtenyo.beta.service"]
|
"services": ["com.monkeystew.todotxtenyo.beta.service"]
|
||||||
|
|
Loading…
Reference in a new issue