Bug 362866 Tasklist, unifinder and views still display old task/event after conversion to event/task. r=lilmatt, mvl

This commit is contained in:
jminta%gmail.com 2006-12-09 01:12:10 +00:00
Родитель 3c40dad8dc
Коммит 94eb641d30
4 изменённых файлов: 16 добавлений и 8 удалений

Просмотреть файл

@ -1442,6 +1442,10 @@
for each (var occ in occs)
this.calView.doDeleteItem(occ);
if (aNewItem instanceof Components.interfaces.calITodo &&
!this.mTasksInView) {
return;
}
occs = aNewItem.getOccurrencesBetween(this.calView.startDate,
this.calView.queryEndDate,
{});

Просмотреть файл

@ -1762,13 +1762,13 @@
}
if (aNewItem instanceof Components.interfaces.calITodo &&
aOldItem instanceof Components.interfaces.calITodo &&
!this.calView.mTasksInView)
return;
var occs;
if (!aOldItem instanceof Components.interfaces.calITodo ||
if (!(aOldItem instanceof Components.interfaces.calITodo) ||
(aOldItem.entryDate && aOldItem.dueDate)) {
occs = aOldItem.getOccurrencesBetween(this.calView.startDate,
this.calView.queryEndDate,
@ -1778,7 +1778,7 @@
}
}
if (aNewItem instanceof Components.interfaces.calITodo &&
(!aNewItem.entryDate || !aNewItem.dueDate))
(!aNewItem.entryDate || !aNewItem.dueDate || !this.mTasksInView))
return;
occs = aOldItem.getOccurrencesBetween(this.calView.startDate,
this.calView.queryEndDate,

Просмотреть файл

@ -173,12 +173,15 @@ var unifinderObserver = {
this.addItemToTree(aItem);
},
onModifyItem: function(aNewItem, aOldItem) {
if (!(aNewItem instanceof Components.interfaces.calIEvent) ||
this.mInBatch) {
if (this.mInBatch) {
return;
}
this.removeItemFromTree(aOldItem);
this.addItemToTree(aNewItem);
if (aOldItem instanceof Components.interfaces.calIEvent) {
this.removeItemFromTree(aOldItem);
}
if (aNewItem instanceof Components.interfaces.calIEvent) {
this.addItemToTree(aNewItem);
}
},
onDeleteItem: function(aDeletedItem) {
if (!(aDeletedItem instanceof Components.interfaces.calIEvent) ||

Просмотреть файл

@ -93,7 +93,8 @@ var unifinderToDoDataSourceObserver =
}
},
onModifyItem: function(aNewItem, aOldItem) {
if (aNewItem instanceof Components.interfaces.calITodo &&
if ((aNewItem instanceof Components.interfaces.calITodo ||
aOldItem instanceof Components.interfaces.calITodo) &&
!this.mInBatch)
{
toDoUnifinderRefresh();