Remove empty function clearAllNotifications

This commit is contained in:
Nicola Benaglia
2025-05-24 12:05:23 +02:00
parent a87bec8227
commit 4585a2a570
3 changed files with 4 additions and 82 deletions

View File

@@ -34,7 +34,6 @@ import {
cancelBanCase,
cancelInvitationToGroupCase,
checkLocalCase,
clearAllNotificationsCase,
createGroupCase,
createPollCase,
createRewardShareCase,
@@ -303,6 +302,7 @@ export const createEndpoint = async (endpoint, customApi?: string) => {
};
export const walletVersion = 2;
// List of your API endpoints
const apiEndpoints = [
'https://api.qortal.org',
@@ -436,10 +436,6 @@ export async function performPowTask(chatBytes, difficulty) {
});
}
function playNotificationSound() {
// chrome.runtime.sendMessage({ action: "PLAY_NOTIFICATION_SOUND" });
}
const handleNotificationDirect = async (directs) => {
let isFocused;
const wallet = await getSaveWallet();
@@ -603,7 +599,7 @@ export function updateThreadActivity({
threads = JSON.parse(storedData);
}
let lastResetTime = threads.lastResetTime || 0;
const lastResetTime = threads.lastResetTime || 0;
// Check if a week has passed since the last reset
if (currentTime - lastResetTime > ONE_WEEK_IN_MS) {
@@ -653,7 +649,7 @@ export function updateThreadActivity({
const handleNotification = async (groups) => {
const wallet = await getSaveWallet();
const address = wallet.address0;
let isDisableNotifications =
const isDisableNotifications =
(await getUserSettings({ key: 'disable-push-notifications' })) || false;
let mutedGroups = (await getUserSettings({ key: 'mutedGroups' })) || [];
@@ -678,7 +674,6 @@ const handleNotification = async (groups) => {
const newActiveChats = data;
const oldActiveChats = await getChatHeads();
let results = [];
let newestLatestTimestamp = null;
let oldestLatestTimestamp = null;
// Find the latest timestamp from newActiveChats
@@ -878,13 +873,6 @@ export async function storeWallets(wallets) {
});
}
export async function clearAllNotifications() {
// const notifications = await chrome.notifications.getAll();
// for (const notificationId of Object.keys(notifications)) {
// await chrome.notifications.clear(notificationId);
// }
}
export async function getUserInfo() {
const wallet = await getSaveWallet();
const address = wallet.address0;
@@ -3233,9 +3221,6 @@ function setupMessageListener() {
case 'addGroupNotificationTimestamp':
addGroupNotificationTimestampCase(request, event);
break;
case 'clearAllNotifications':
clearAllNotificationsCase(request, event);
break;
case 'setGroupData':
setGroupDataCase(request, event);
break;