зеркало из https://github.com/mozilla/pjs.git
Bug 362866 Tasklist, unifinder and views still display old task/event after conversion to event/task. r=lilmatt, mvl
This commit is contained in:
Родитель
3c40dad8dc
Коммит
94eb641d30
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче