if not building author collections, don't delete places record on message delete of one message/author record.

This commit is contained in:
alta88@gmail.com 2010-01-08 23:59:49 -07:00
Родитель 28738d7767
Коммит dd77384f93
1 изменённых файлов: 8 добавлений и 5 удалений

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

@ -149,11 +149,14 @@ SnowlMessage.delete = function(aMessage) {
"DELETE FROM people " +
"WHERE id = " + message.author.person.id);
// Finally, clean up Places bookmark by author's placeID. A collections
// tree rebuild is triggered by Places on removeItem of a visible item,
// triggering a select event. Need to bypass in onSelect.
SnowlMessage.prototype.CollectionsView.noSelect = true;
PlacesUtils.bookmarks.removeItem(message.author.person.placeID);
// Finally, clean up Places bookmark by author's placeID. If authors
// collections are not being built, placeID will be null, so skip.
// A collections tree rebuild is triggered by Places on removeItem of a
// visible item, triggering a select event. Need to bypass in onSelect.
if (message.author.person.placeID) {
SnowlMessage.prototype.CollectionsView.noSelect = true;
PlacesUtils.bookmarks.removeItem(message.author.person.placeID);
}
}
SnowlDatastore.dbConnection.commitTransaction();