Skip to content

Commit

Permalink
RosterDialog: groupModel will always have at least one group Friends
Browse files Browse the repository at this point in the history
  • Loading branch information
stokito committed Aug 24, 2024
1 parent 4738d93 commit b4a355f
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,7 @@ public void mouseEntered(MouseEvent e) {
if (groupModel.isEmpty()) {
groupBox.addItem("Friends");
}

if (groupModel.size() > 0) {
groupBox.setSelectedIndex(0);
}
groupBox.setSelectedIndex(0);

jidField.addFocusListener(new FocusListener() {
@Override
Expand Down Expand Up @@ -281,7 +278,7 @@ public void setDefaultGroup(ContactGroup contactGroup) {
if (groupModel.contains(groupName)) {
groupBox.setSelectedItem(groupName);
}
else if (!groupModel.isEmpty()) {
else {
groupBox.addItem(groupName);
groupBox.setSelectedItem(groupName);
}
Expand Down

0 comments on commit b4a355f

Please sign in to comment.