feat/fix/refactor: Кнопка добавления человека в контакты, возможность развертывания аватарки на экране профиля, включение сторисов по умолчанию, показ сторисов на экране чатов, чата, и при просмотре списка участников, миниапы у ботов. Фикс прогресса просмотра сториса, фикс предпросмотра медиав пикере, прогресс бар отправки фото/видео/файлов + фото продолжат отправку даже если выйти с чата. Вынес превью фото, добавил отдельный модуль отправки медиа

This commit is contained in:
Jganenokk
2026-08-05 20:04:12 +07:00
parent e87d3d57f7
commit 3915cb957e
33 changed files with 2522 additions and 680 deletions
+7 -1
View File
@@ -465,6 +465,10 @@ class ContactsModule {
}
}
static final Map<int, ContactPhotos> _photosHead = {};
static ContactPhotos? cachedPhotos(int contactId) => _photosHead[contactId];
static Future<ContactPhotos> fetchPhotos(
Api api,
int contactId, {
@@ -482,7 +486,9 @@ class ContactsModule {
? rawUrls.whereType<String>().toList()
: <String>[];
final total = map['total'] is int ? map['total'] as int : urls.length;
return ContactPhotos(urls: urls, total: total);
final photos = ContactPhotos(urls: urls, total: total);
if (from == 0) _photosHead[contactId] = photos;
return photos;
}
static Future<List<CachedContact>> getContacts(int accountId) async {