Commit 63ac7b2b authored by Geoffrey Métais's avatar Geoffrey Métais

Do not duplicate callbacks

parent 34b2a839
......@@ -437,7 +437,8 @@ public class Medialibrary {
public void addDeviceDiscoveryCb(DevicesDiscoveryCb cb) {
synchronized (devicesDiscoveryCbList) {
devicesDiscoveryCbList.add(cb);
if (!devicesDiscoveryCbList.contains(cb))
devicesDiscoveryCbList.add(cb);
}
}
......@@ -449,7 +450,8 @@ public class Medialibrary {
public void addEntryPointsEventsCb(EntryPointsEventsCb cb) {
synchronized (entryPointsEventsCbList) {
entryPointsEventsCbList.add(cb);
if (!entryPointsEventsCbList.contains(cb))
entryPointsEventsCbList.add(cb);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment