Preserve pathname in location

This commit is contained in:
Jeremy Mahieu 2019-12-18 20:05:19 +01:00 committed by Lorenz Hübschle-Schneider
parent 3bffb13930
commit 844810408d
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,7 @@ document.addEventListener("deviceready", function () {
} }
}, false); }, false);
var weechat = angular.module('weechat', ['ngRoute', 'localStorage', 'weechatModels', 'bufferResume', 'plugins', 'IrcUtils', 'ngSanitize', 'ngWebsockets', 'ngTouch'], ['$compileProvider', '$locationProvider', function($compileProvider, $locationProvider) { var weechat = angular.module('weechat', ['ngRoute', 'localStorage', 'weechatModels', 'bufferResume', 'plugins', 'IrcUtils', 'ngSanitize', 'ngWebsockets', 'ngTouch'], ['$compileProvider', function($compileProvider) {
// hacky way to be able to find out if we're in debug mode // hacky way to be able to find out if we're in debug mode
weechat.compileProvider = $compileProvider; weechat.compileProvider = $compileProvider;
}]); }]);
@ -23,6 +23,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
function ($rootScope, $scope, $store, $timeout, $location, $log, models, bufferResume, connection, notifications, utils, settings) function ($rootScope, $scope, $store, $timeout, $location, $log, models, bufferResume, connection, notifications, utils, settings)
{ {
$location.path(window.location.pathname);
window.openBuffer = function(channel) { window.openBuffer = function(channel) {
$scope.openBuffer(channel); $scope.openBuffer(channel);
$scope.$apply(); $scope.$apply();