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

--HG--
extra : rebase_source : 933b5d35702af18078fab1a7111e65a4332a8348
This commit is contained in:
alta88@gmail.com 2010-01-08 23:59:49 -07:00
Родитель c744e765e0
Коммит adc7d2afa8
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();