diff --git a/camino/src/bookmarks/BookmarkMenu.mm b/camino/src/bookmarks/BookmarkMenu.mm index 45b9d2855a7..d6ef4a2e69f 100644 --- a/camino/src/bookmarks/BookmarkMenu.mm +++ b/camino/src/bookmarks/BookmarkMenu.mm @@ -301,6 +301,19 @@ const long kOpenInTabsTag = 0xBEEF; - (void)bookmarkChanged:(NSNotification *)inNotification { BookmarkItem* changedItem = [inNotification object]; + + NSNumber* noteChangeFlags = [[inNotification userInfo] objectForKey:BookmarkItemChangedFlagsKey]; + unsigned int changeFlags = kBookmarkItemEverythingChangedMask; + if (noteChangeFlags) + changeFlags = [noteChangeFlags unsignedIntValue]; + + // first, see if it's a notification that this folder's children have changed + if ((changedItem == mFolder) && (changeFlags & kBookmarkItemChildrenChangedMask)) { + mDirty = YES; + return; + } + + // any other change is only interesting if it's to one of this folder's children if ([changedItem parent] != mFolder) return; @@ -309,12 +322,6 @@ const long kOpenInTabsTag = 0xBEEF; if (itemIndex == -1) return; - unsigned int changeFlags = kBookmarkItemEverythingChangedMask; - NSNumber* noteChangeFlags = [[inNotification userInfo] objectForKey:BookmarkItemChangedFlagsKey]; - - if (noteChangeFlags) - changeFlags = [noteChangeFlags unsignedIntValue]; - // if it changed to or from a separator (or everything changed), just do a rebuild later if (changeFlags & kBookmarkItemStatusChangedMask) { mDirty = YES;