Simplify CC code with new softRefreshView function

This new function automatically clicks the Community Console logo to
soft refresh the current view. It will be used in other parts of the
extension in the future, so this commits refactors the code so the logic
is found in a unique place in the codebase.

Bug: twpowertools:153
Change-Id: I2b061123021e5026e95793d9a77730c2a1eb70ae
diff --git a/src/contentScripts/communityConsole/batchLock.js b/src/contentScripts/communityConsole/batchLock.js
index db08a06..83af3ce 100644
--- a/src/contentScripts/communityConsole/batchLock.js
+++ b/src/contentScripts/communityConsole/batchLock.js
@@ -1,6 +1,6 @@
 import {isOptionEnabled} from '../../common/optionsUtils.js';
 
-import {addButtonToThreadListActions, removeChildNodes, shouldAddBtnToActionBar} from './utils/common.js';
+import {addButtonToThreadListActions, removeChildNodes, shouldAddBtnToActionBar, softRefreshView} from './utils/common.js';
 
 const kLockDebugId = 'twpt-lock';
 
@@ -71,13 +71,7 @@
             btn.addEventListener('click', _ => {
               if (btn.classList.contains('is-disabled')) return;
 
-              if (action == 'close') {
-                var refreshButton = document.querySelector('.app-title-button');
-                if (refreshButton == null)
-                  window.location.reload();
-                else
-                  refreshButton.click();
-              }
+              if (action == 'close') softRefreshView();
 
               modal.classList.remove('visible');
               modal.style.display = 'none';