forked from dorkbox/SystemTray
Fixed adding an entry without specifying an index (this simplifies peer
logic)
This commit is contained in:
parent
9bf01aaf04
commit
0279fb2852
@ -269,6 +269,7 @@ class Menu extends MenuItem {
|
||||
synchronized (menuEntries) {
|
||||
// access on this object must be synchronized for object visibility
|
||||
if (index == -1) {
|
||||
index = menuEntries.size();
|
||||
menuEntries.add(entry);
|
||||
} else {
|
||||
if (!menuEntries.isEmpty() && menuEntries.get(0) instanceof Status) {
|
||||
|
Loading…
Reference in New Issue
Block a user