Skip to content

Commit

Permalink
Refactor logic
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Mar 31, 2022
1 parent 45c592c commit 6da4a81
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions lhc_web/design/defaulttheme/js/angular.lhc.js
Expand Up @@ -1091,12 +1091,6 @@ lhcAppControllers.controller('LiveHelperChatCtrl',['$scope','$http','$location',

$scope.loadChatList = function() {

if (_that.lhcListRequestInProgress === true) {
return;
}

_that.lhcListRequestInProgress = true;

if (localStorage) {
try {
$scope.pending_chats_expanded = localStorage.getItem('pending_chats_expanded') != 'false';
Expand Down Expand Up @@ -1126,7 +1120,13 @@ lhcAppControllers.controller('LiveHelperChatCtrl',['$scope','$http','$location',
_that.lhcListRequestInProgress = false;
return;
}


if (_that.lhcListRequestInProgress === true) {
return;
}

_that.lhcListRequestInProgress = true;

clearTimeout($scope.timeoutControl);
LiveHelperChatFactory.loadChatList($scope.getSyncFilter()).then(function(data){

Expand Down
2 changes: 1 addition & 1 deletion lhc_web/design/defaulttheme/js/angular.lhc.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 6da4a81

Please sign in to comment.