Rename getCustomPromptsUsedSpace to getLocalStorageUsedSpace for clarity and update references

This commit is contained in:
Mic 2025-06-15 23:17:00 +02:00
parent 509b8de8e0
commit 2351034e3c
2 changed files with 3 additions and 3 deletions

View file

@ -587,7 +587,7 @@ const insertHtml = function (replyHtml, fullBody_string) {
return fullBody.body.innerHTML;
}
export async function getCustomPromptsUsedSpace(){
export async function getLocalStorageUsedSpace(){
// we can't use this, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1385832
//let customprompts_space = await browser.storage.local.getBytesInUse("_custom_prompt");
//let's use a workaround

View file

@ -18,7 +18,7 @@
import { prefs_default } from "../../options/mzta-options-default.js";
import { getPrompts, setDefaultPromptsProperties, setCustomPrompts, preparePromptsForExport, preparePromptsForImport } from "../../js/mzta-prompts.js";
import { ChatGPTWeb_models, isThunderbird128OrGreater, getCustomPromptsUsedSpace, sanitizeHtml, validateCustomData_ChatGPTWeb, getChatGPTWebModelsList_HTML } from "../../js/mzta-utils.js";
import { ChatGPTWeb_models, isThunderbird128OrGreater, getLocalStorageUsedSpace, sanitizeHtml, validateCustomData_ChatGPTWeb, getChatGPTWebModelsList_HTML } from "../../js/mzta-utils.js";
import { taLogger } from "../../js/mzta-logger.js";
import { getPlaceholders } from "../../js/mzta-placeholders.js";
import { textareaAutocomplete } from "../../js/mzta-placeholders-autocomplete.js";
@ -936,7 +936,7 @@ function clearMessage() {
}
async function setStorageSpace() {
let storage_space = await getCustomPromptsUsedSpace();
let storage_space = await getLocalStorageUsedSpace();
document.getElementById('storage_space').textContent = storage_space;
}