remove unused imageUrl in localStorage (since temp table is being used)

This commit is contained in:
2026-02-21 15:07:40 -07:00
parent 0d5602839c
commit 59303010c1
3 changed files with 6 additions and 9 deletions

View File

@@ -1732,8 +1732,9 @@ export const PlatformServiceMixin = {
// =================================================
/**
* Get temporary data by ID - $getTemp()
* Retrieves temporary data from the temp table
* Get data from temp table by ID
* Currently set by main.capacitor.ts storeSharedImageInTempDB()
*
* @param id Temporary storage ID
* @returns Promise<Temp | null> Temporary data or null if not found
*/
@@ -1747,8 +1748,8 @@ export const PlatformServiceMixin = {
},
/**
* Delete temporary data by ID - $deleteTemp()
* Removes temporary data from the temp table
* Delete data from temp table by ID
*
* @param id Temporary storage ID
* @returns Promise<boolean> Success status
*/

View File

@@ -1520,7 +1520,7 @@ export default class AccountViewView extends Vue {
} else {
logger.error("Non-success deleting image:", response);
this.notify.error(ACCOUNT_VIEW_CONSTANTS.ERRORS.IMAGE_DELETE_PROBLEM);
// keep the imageUrl in localStorage so the user can try again if they want
// keep the profileImageUrl so the user can try again if they want
}
} catch (error) {
if (isApiError(error) && error.response?.status === 404) {

View File

@@ -401,7 +401,6 @@ export default class GiftedDetails extends Vue {
this.imageUrl = ((this.$route.query["imageUrl"] as string) ||
this.prevCredToEdit?.claim?.image ||
localStorage.getItem("imageUrl") ||
this.imageUrl) as string;
// this is an endpoint for sharing project info to highlight something given
@@ -577,7 +576,6 @@ export default class GiftedDetails extends Vue {
return;
}
localStorage.removeItem("imageUrl");
this.imageUrl = "";
} catch (error) {
logger.error("Error deleting image:", error);
@@ -585,7 +583,6 @@ export default class GiftedDetails extends Vue {
if ((error as any)?.response?.status === 404) {
logger.log("Weird: the image was already deleted.", error);
localStorage.removeItem("imageUrl");
this.imageUrl = "";
// it already doesn't exist so we won't say anything to the user
@@ -749,7 +746,6 @@ export default class GiftedDetails extends Vue {
logger.error("Error checking seed backup status:", error);
}
localStorage.removeItem("imageUrl");
if (this.destinationPathAfter) {
(this.$router as Router).push({ path: this.destinationPathAfter });
} else {