Alexander Wels has uploaded a new change for review. Change subject: webadmin: Duplicate entry in event list ......................................................................
webadmin: Duplicate entry in event list - In Firefox under certain conditions an event would end up in the event list twice. This patch checks to make sure an item is not in the list already before adding it. Change-Id: I04aaba78d1c60451480fe847ea03da75424d4112 Signed-off-by: Alexander Wels <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/events/EventListModel.java 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/86/25686/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/events/EventListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/events/EventListModel.java index 179e022..1a5f42e 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/events/EventListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/events/EventListModel.java @@ -237,8 +237,11 @@ { list.remove(list.size() - 1); } - - list.add(0, item); + // This check is for an issue in FF where somehow the event lists gets items twice. This + // simply checks if the event is already there and only adds it if it is not there. + if (!list.contains(item)) { + list.add(0, item); + } } getItemsChangedEvent().raise(this, EventArgs.EMPTY); setLastEvent(Linq.firstOrDefault(list)); -- To view, visit http://gerrit.ovirt.org/25686 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04aaba78d1c60451480fe847ea03da75424d4112 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
