mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
fix: Update pagination logic in the help center (#5693)
This commit is contained in:
@@ -4,6 +4,17 @@ import { IFrameHelper } from 'widget/helpers/utils';
|
||||
import { showBadgeOnFavicon } from './faviconHelper';
|
||||
|
||||
export const initOnEvents = ['click', 'touchstart', 'keypress', 'keydown'];
|
||||
|
||||
export const getAudioContext = () => {
|
||||
let audioCtx;
|
||||
try {
|
||||
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
||||
} catch {
|
||||
// AudioContext is not available.
|
||||
}
|
||||
return audioCtx;
|
||||
};
|
||||
|
||||
export const getAlertAudio = async (baseUrl = '', type = 'dashboard') => {
|
||||
const audioCtx = getAudioContext();
|
||||
|
||||
@@ -35,18 +46,6 @@ export const getAlertAudio = async (baseUrl = '', type = 'dashboard') => {
|
||||
}
|
||||
};
|
||||
|
||||
export const getAudioContext = () => {
|
||||
let audioCtx;
|
||||
|
||||
try {
|
||||
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
||||
} catch {
|
||||
// AudioContext is not available.
|
||||
}
|
||||
|
||||
return audioCtx;
|
||||
};
|
||||
|
||||
export const notificationEnabled = (enableAudioAlerts, id, userId) => {
|
||||
if (enableAudioAlerts === 'mine') {
|
||||
return userId === id;
|
||||
|
||||
Reference in New Issue
Block a user