Сделал изменение профиля рабочим, возможность загрузить свое фото или выбрать с пресетов; работающие сообщения типа komet.color_#...

This commit is contained in:
jganenok
2025-12-01 21:16:09 +07:00
parent f367eb9824
commit ba1a954c5b
8 changed files with 954 additions and 282 deletions

View File

@@ -16,28 +16,9 @@ class LocalProfileManager {
}
Future<Profile?> getActualProfile(Profile? serverProfile) async {
await initialize();
final localAvatarPath = await _profileCache.getLocalAvatarPath();
final mergedProfile = await _profileCache.getMergedProfile(serverProfile);
if (mergedProfile != null && localAvatarPath != null) {
return Profile(
id: mergedProfile.id,
phone: mergedProfile.phone,
firstName: mergedProfile.firstName,
lastName: mergedProfile.lastName,
description: mergedProfile.description,
photoBaseUrl: 'file://$localAvatarPath',
photoId: mergedProfile.photoId,
updateTime: mergedProfile.updateTime,
options: mergedProfile.options,
accountStatus: mergedProfile.accountStatus,
profileOptions: mergedProfile.profileOptions,
);
}
return mergedProfile;
// Полностью отключаем локальные оверрайды профиля:
// всегда используем только данные с сервера.
return serverProfile;
}
Future<String?> getLocalAvatarPath() async {