From 71204fbe9d2ea3967270115092b4c00ccc66bb9e Mon Sep 17 00:00:00 2001 From: PetrovY Date: Mon, 12 Jan 2026 10:30:21 +0300 Subject: [PATCH] =?UTF-8?q?fix(update):=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D0=B0?= =?UTF-8?q?=20versionCode=20=D0=BD=D0=B0=20versionApp=20=D0=B2=20=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D0=BE=D0=B4=D0=B0=D1=85=20=D0=BF=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=BA=D0=B8=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/features/update/README.md | 4 ++-- .../update/data/repository/update_mock_repository.dart | 2 +- lib/features/update/data/repository/update_repository.dart | 2 +- .../update/domain/repository/i_update_repository.dart | 4 ++-- lib/features/update/domain/state/cubit/update_cubit.dart | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/features/update/README.md b/lib/features/update/README.md index 05fb779..421c740 100644 --- a/lib/features/update/README.md +++ b/lib/features/update/README.md @@ -37,6 +37,7 @@ - Статический метод `show` безопасно не откроет модалку, если `updateEntity == null` Пример показа модального окна: + ```dart await SoftUpdateModal.show( context, @@ -54,10 +55,9 @@ await SoftUpdateModal.show( - `UpdateRoutes.buildRoutes()` — регистрирует экран hard-обновления по пути `/update` - ## Структура модуля -``` +```md features/update/ ├── data/ │ └── repository/ diff --git a/lib/features/update/data/repository/update_mock_repository.dart b/lib/features/update/data/repository/update_mock_repository.dart index 8251876..554fed9 100644 --- a/lib/features/update/data/repository/update_mock_repository.dart +++ b/lib/features/update/data/repository/update_mock_repository.dart @@ -26,7 +26,7 @@ final class UpdateMockRepository implements IUpdateRepository { @override Future checkForUpdates({ - required String versionCode, + required String versionApp, required String platform, }) async { // Имитация задержки для асинхронной операции diff --git a/lib/features/update/data/repository/update_repository.dart b/lib/features/update/data/repository/update_repository.dart index a44ad11..3d3bdff 100644 --- a/lib/features/update/data/repository/update_repository.dart +++ b/lib/features/update/data/repository/update_repository.dart @@ -14,7 +14,7 @@ final class UpdateRepository implements IUpdateRepository { @override Future checkForUpdates({ - required String versionCode, + required String versionApp, required String platform, }) { // TODO: Реализовать реальную логику проверки обновлений diff --git a/lib/features/update/domain/repository/i_update_repository.dart b/lib/features/update/domain/repository/i_update_repository.dart index 39abe4d..48209be 100644 --- a/lib/features/update/domain/repository/i_update_repository.dart +++ b/lib/features/update/domain/repository/i_update_repository.dart @@ -6,11 +6,11 @@ import 'package:friflex_starter/features/update/domain/entity/update_entity.dart /// {@endtemplate} abstract interface class IUpdateRepository with DiBaseRepo { /// Проверяет наличие обновлений - /// [versionCode] - текущий код версии приложения + /// [versionApp] - текущий версия приложения /// [platform] - платформа (например, 'android' или 'ios') /// Возвращает [UpdateEntity] с информацией об обновлении Future checkForUpdates({ - required String versionCode, + required String versionApp, required String platform, }); } diff --git a/lib/features/update/domain/state/cubit/update_cubit.dart b/lib/features/update/domain/state/cubit/update_cubit.dart index aaba84e..e7ca6a3 100644 --- a/lib/features/update/domain/state/cubit/update_cubit.dart +++ b/lib/features/update/domain/state/cubit/update_cubit.dart @@ -16,17 +16,17 @@ class UpdateCubit extends Cubit { final IUpdateRepository _updatesRepository; /// Метод для проверки доступности обновлений - /// [versionCode] - текущий код версии приложения + /// [versionApp] - текущая версия приложения /// [platform] - платформа (например, 'android' или 'ios') Future checkForUpdates({ - required String versionCode, + required String versionApp, required String platform, }) async { if (state is UpdateLoadingState) return; emit(const UpdateLoadingState()); try { final updateInfo = await _updatesRepository.checkForUpdates( - versionCode: versionCode, + versionApp: versionApp, platform: platform, ); emit(UpdateSuccessState(updateInfo));