Оптимизирован код вложений, исправлена установка аватарки на диалог, а не у отправителя

This commit is contained in:
RoyceDa
2026-02-20 17:43:56 +02:00
parent db72246e5a
commit c64a7005d3
6 changed files with 22 additions and 17 deletions

View File

@@ -7,7 +7,15 @@ import { useConsoleLogger } from "@/app/hooks/useConsoleLogger";
import { useSystemAccounts } from "../SystemAccountsProvider/useSystemAccounts";
import { AVATAR_PASSWORD_TO_ENCODE } from "@/app/constants";
export const AvatarContext = createContext({});
export interface AvatarProviderContextValue {
deliveredAvatars: string[];
saveAvatar: (fromPublicKey: string, path : string, decryptedContent : string) => Promise<void>;
loadAvatarsFromCacheByPublicKey: (publicKey : string, allDecode? : boolean) => Promise<void>;
changeAvatar: (base64Image : string, entity : string) => Promise<void>;
decodedAvatarsCache: AvatarCacheEntry[];
}
export const AvatarContext = createContext<AvatarProviderContextValue | null>(null);
interface AvatarProviderProps {
children: React.ReactNode;