Reset path to weechat if not filled in.

This commit is contained in:
Jeremy Mahieu 2019-12-16 17:22:20 +01:00
parent 5a5927104d
commit 0823a417f2
1 changed files with 3 additions and 1 deletions

View File

@ -610,7 +610,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
}
return connection.fetchMoreLines(numLines);
};
$scope.infiniteScroll = function() {
// Check if we are already fetching
if ($rootScope.loadingLines) {
@ -677,10 +677,12 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
if ((parts = regexHost.exec(settings.hostField)) !== null) { //host only
settings.host = parts[1];
settings.path = "weechat";
$rootScope.portDisabled = false;
} else if ((parts = regexHostPort.exec(settings.hostField)) !== null) { //host:port
settings.host = parts[1];
settings.port = parts[2];
settings.path = "weechat";
$rootScope.portDisabled = true;
} else if ((parts = regexHostPortPath.exec(settings.hostField)) !== null) { //host:port/path
settings.host = parts[1];