Skip to content

Commit

Permalink
allow adding channels via url form the add field, as already possible…
Browse files Browse the repository at this point in the history
… for drag&drop
  • Loading branch information
s1mpl3x committed Oct 30, 2015
1 parent 3edfdfe commit f41092d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/eu/over9000/skadi/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,14 @@ private void setupToolbarLeft(final Stage stage) {
return;
}

final boolean result = channelStore.addChannel(name, statusBar);
final String nameFromUrl = StringUtil.extractUsernameFromURL(name);

final boolean result;
if (nameFromUrl != null) {
result = channelStore.addChannel(nameFromUrl, statusBar);
} else {
result = channelStore.addChannel(name, statusBar);
}

if (result) {
addName.clear();
Expand Down

0 comments on commit f41092d

Please sign in to comment.