diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml
index 9d810d8e..4320ecc5 100644
--- a/.gitea/workflows/test-flight-cd.yaml
+++ b/.gitea/workflows/test-flight-cd.yaml
@@ -20,6 +20,7 @@ jobs:
- name: Flutter build
run: |
+ echo "${API_APPSTORE_KEY}" | base64 --decode > ios/AuthKey.p8
flutter clean
flutter pub get
flutter pub upgrade
@@ -31,6 +32,8 @@ jobs:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
MATCH_PASSWORD: ${{ vars.IOS_RUNNER_CI_PASSWORD }}
+ FASTLANE_PASSWORD: ${{ vars.FASTLANE_PASSWORD }}
MATCH_GIT_URL: http://gitea.office.local:3000/mso7nueh/fastlane
FASTLANE_USER: eatvio2023@icloud.com
- FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ vars.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
\ No newline at end of file
+ FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ vars.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
+ API_APPSTORE_KEY: ${{ vars.API_APPSTORE_KEY }}
\ No newline at end of file
diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml
index 75372b09..fd291367 100644
--- a/.gitea/workflows/test.yml
+++ b/.gitea/workflows/test.yml
@@ -3,7 +3,7 @@ name: Eatvio App Android Test
on: [ pull_request ]
env:
- flutter_version: "3.32.5"
+ flutter_version: "3.32.8"
java_version: "21.x"
flutter_channel: "stable"
my_local_cache_dir: "/opt/hostedtoolcache/"
diff --git a/android/app/build.gradle b/android/app/build.gradle
index a5377cc6..c9fe6d27 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -19,17 +19,17 @@ android {
ndkVersion = "27.0.12077973"
compileOptions {
- sourceCompatibility = JavaVersion.VERSION_21
- targetCompatibility = JavaVersion.VERSION_21
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
- jvmTarget = 21
+ jvmTarget = JavaVersion.VERSION_11.toString()
}
defaultConfig {
applicationId = "com.eatvioapp.app"
- minSdk = flutter.minSdkVersion
+ minSdk = 23
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
diff --git a/android/gradle.properties b/android/gradle.properties
index 25971708..f018a618 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,3 +1,3 @@
-org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
+org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index f587a472..ac3b4792 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
index 833c476b..29eab0d3 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -22,7 +22,7 @@ plugins {
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.4.2" apply false
// END: FlutterFire Configuration
- id "org.jetbrains.kotlin.android" version "2.0.21" apply false
+ id "org.jetbrains.kotlin.android" version "2.1.0" apply false
}
include ":app"
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index d2269b71..9a27847e 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -213,10 +213,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
+ inputPaths = (
+ );
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
+ outputPaths = (
+ );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@@ -283,10 +287,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
+ inputPaths = (
+ );
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
+ outputPaths = (
+ );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
@@ -388,7 +396,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 52;
+ CURRENT_PROJECT_VERSION = 64;
DEVELOPMENT_TEAM = VL68C36HYS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -406,7 +414,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- MARKETING_VERSION = 1.0.50;
+ MARKETING_VERSION = 1.2.3;
PRODUCT_BUNDLE_IDENTIFIER = com.eatvioapp.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.eatvioapp.app 1747050044";
@@ -538,7 +546,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 52;
+ CURRENT_PROJECT_VERSION = 64;
DEVELOPMENT_TEAM = VL68C36HYS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -556,7 +564,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- MARKETING_VERSION = 1.0.50;
+ MARKETING_VERSION = 1.2.3;
PRODUCT_BUNDLE_IDENTIFIER = com.eatvioapp.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.eatvioapp.app 1747050044";
@@ -576,7 +584,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 52;
+ CURRENT_PROJECT_VERSION = 64;
DEVELOPMENT_TEAM = VL68C36HYS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -594,7 +602,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- MARKETING_VERSION = 1.0.50;
+ MARKETING_VERSION = 1.2.3;
PRODUCT_BUNDLE_IDENTIFIER = com.eatvioapp.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.eatvioapp.app 1747050044";
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 6de3b03b..2341e63f 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -21,7 +21,7 @@
CFBundleSignature
????
CFBundleVersion
- 52
+ 64
ITSAppUsesNonExemptEncryption
LSRequiresIPhoneOS
diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile
index 4073b355..9340117d 100644
--- a/ios/fastlane/Fastfile
+++ b/ios/fastlane/Fastfile
@@ -18,9 +18,10 @@ default_platform(:ios)
platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
- match(type: "appstore")
+ match(type: "appstore", readonly: true)
increment_build_number(xcodeproj: "Runner.xcodeproj")
build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store", codesigning_identity: "Apple Distribution")
+ app_store_connect_api_key(key_id: "325JS9JCZH", issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3", key_filepath: "./AuthKey.p8")
upload_to_testflight
end
end
diff --git a/ios/fastlane/report.xml b/ios/fastlane/report.xml
index c86e2b65..0d039029 100644
--- a/ios/fastlane/report.xml
+++ b/ios/fastlane/report.xml
@@ -5,22 +5,24 @@
-
+
-
+
-
+
-
+
+
+
diff --git a/lib/core/app_router.dart b/lib/core/app_router.dart
index 9dc8612f..c691b0b2 100644
--- a/lib/core/app_router.dart
+++ b/lib/core/app_router.dart
@@ -1,5 +1,3 @@
-import 'dart:io';
-import 'package:device_info_plus/device_info_plus.dart';
import 'package:dio/dio.dart';
import 'package:eatvio_app/core/const.dart';
import 'package:eatvio_app/core/firebase_api.dart';
@@ -121,7 +119,9 @@ class AppRouter {
GoRoute(
path: 'forget-password-screen',
name: 'forgetPasswordScreen',
- builder: (context, state) => ForgetPasswordScreen(isAuth: state.extra as bool,),
+ builder: (context, state) => ForgetPasswordScreen(
+ isAuth: state.extra as bool,
+ ),
),
GoRoute(
path: 'scan-qr-code-screen',
@@ -205,21 +205,9 @@ class AppRouter {
builder: (context, state) => const WelcomeScreen(),
redirect: (context, state) async {
try {
- if (await TokenStorage.haveTokenInStorage()) {
- final firebaseApi = sl();
- final fbToken = await firebaseApi.getToken();
- final deviceInfo = DeviceInfoPlugin();
- await sl().post(
- '/api/profile/notification/token/register',
- data: {
- 'platform': Platform.isIOS ? 'ios' : 'android',
- 'hw_id': Platform.isIOS ? (await deviceInfo.iosInfo).identifierForVendor : (await deviceInfo.androidInfo).id,
- 'token': fbToken,
- },
- );
- }
final sharedPreferences = await SharedPreferences.getInstance();
final welcomeScreenWasShowed = sharedPreferences.getBool('welcomeScreenWasShowed') ?? false;
+ await sl().registerPushToken();
if (welcomeScreenWasShowed == false) {
return null;
} else if (await TokenStorage.haveTokenInStorage()) {
@@ -228,7 +216,7 @@ class AppRouter {
return '/auth-screen';
}
} catch (e) {
- rethrow;
+ return '/feed-screen';
}
},
),
diff --git a/lib/core/comments/presentation/comments_actions_bottom_sheet.dart b/lib/core/comments/presentation/comments_actions_bottom_sheet.dart
index deeea5ff..5506215d 100644
--- a/lib/core/comments/presentation/comments_actions_bottom_sheet.dart
+++ b/lib/core/comments/presentation/comments_actions_bottom_sheet.dart
@@ -23,7 +23,7 @@ void showCommentsActionsBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (context) => Container(
- margin: EdgeInsets.only(left: 8, right: 8, bottom: MediaQuery.of(context).padding.bottom),
+ margin: EdgeInsets.only(left: 8, right: 8, bottom: MediaQuery.of(context).padding.bottom + 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: appTheme.whiteA700,
@@ -189,11 +189,12 @@ class _ActionWidget extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 12),
child: Row(
children: [
- Text(
- text,
- style: TextStyles.textLMedium.copyWith(color: appTheme.black),
+ Expanded(
+ child: Text(
+ text,
+ style: TextStyles.textLMedium.copyWith(color: appTheme.black),
+ ),
),
- const Spacer(),
SvgPicture.asset(iconPath)
],
),
diff --git a/lib/core/const.dart b/lib/core/const.dart
index 31c47e9c..f22f79aa 100644
--- a/lib/core/const.dart
+++ b/lib/core/const.dart
@@ -1,5 +1,5 @@
String baseUrl = 'https://eatvio.ru';
-// String baseUrl = 'https://dev2.eatvio.com';
+bool hidePlans = true;
const List durationValues = [7, 14, 21];
diff --git a/lib/core/firebase_api.dart b/lib/core/firebase_api.dart
index fbf8e5c1..572b56f6 100644
--- a/lib/core/firebase_api.dart
+++ b/lib/core/firebase_api.dart
@@ -1,3 +1,10 @@
+import 'dart:developer';
+import 'dart:io';
+
+import 'package:device_info_plus/device_info_plus.dart';
+import 'package:dio/dio.dart';
+import 'package:eatvio_app/core/locator_service.dart';
+import 'package:eatvio_app/core/token_storage.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
class FirebaseApi {
@@ -7,4 +14,22 @@ class FirebaseApi {
await _firebaseMessaging.requestPermission();
return await _firebaseMessaging.getToken();
}
+
+ Future registerPushToken() async {
+ if (await TokenStorage.haveTokenInStorage()) {
+ try {
+ final deviceInfo = DeviceInfoPlugin();
+ await sl().post(
+ '/api/profile/notification/token/register',
+ data: {
+ 'platform': Platform.isIOS ? 'ios' : 'android',
+ 'hw_id': Platform.isIOS ? (await deviceInfo.iosInfo).identifierForVendor : (await deviceInfo.androidInfo).id,
+ 'token': await getToken(),
+ },
+ );
+ } catch (e, st) {
+ log(e.toString(), stackTrace: st);
+ }
+ }
+ }
}
diff --git a/lib/features/auth/presentation/pages/auth_screen.dart b/lib/features/auth/presentation/pages/auth_screen.dart
index 10fb4172..f5fd7a34 100644
--- a/lib/features/auth/presentation/pages/auth_screen.dart
+++ b/lib/features/auth/presentation/pages/auth_screen.dart
@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:eatvio_app/core/app_router.dart';
import 'package:eatvio_app/core/const.dart';
+import 'package:eatvio_app/core/firebase_api.dart';
import 'package:eatvio_app/core/locator_service.dart';
import 'package:eatvio_app/core/theme/theme_helper.dart';
import 'package:eatvio_app/core/utils/image_constant.dart';
@@ -66,6 +67,7 @@ class _AuthScreenState extends State {
await sl().connectToWebSocket();
await sl().getNotifications();
await sl().connectToWebSocket();
+ await sl().registerPushToken();
showSuccessToast('Успешный вход');
} catch (e) {
rethrow;
diff --git a/lib/features/chat/models/chat_room_model.dart b/lib/features/chat/models/chat_room_model.dart
index dc091ea6..c5ee559f 100644
--- a/lib/features/chat/models/chat_room_model.dart
+++ b/lib/features/chat/models/chat_room_model.dart
@@ -9,7 +9,7 @@ part 'chat_room_model.g.dart';
@freezed
abstract class ChatRoomModel with _$ChatRoomModel {
const factory ChatRoomModel({
- required String id,
+ required String id,
@JsonKey(name: 'chat_room_setting') required ChatRoomSettingsModel chatRoomSettings,
required Users users,
@JsonKey(name: 'chosen_plan_id') required int? chosenPlanId,
@@ -22,13 +22,9 @@ abstract class ChatRoomModel with _$ChatRoomModel {
@freezed
abstract class Users with _$Users {
const factory Users({
-
@JsonKey(name: 'from_chat_user') required ChatUserModel sender,
@JsonKey(name: 'to_chat_user') required ChatUserModel receiver,
-
}) = _Users;
factory Users.fromJson(Map json) => _$UsersFromJson(json);
}
-
-
diff --git a/lib/features/chat/models/chat_room_settings_model.dart b/lib/features/chat/models/chat_room_settings_model.dart
index fa332843..737d0c82 100644
--- a/lib/features/chat/models/chat_room_settings_model.dart
+++ b/lib/features/chat/models/chat_room_settings_model.dart
@@ -6,7 +6,7 @@ part 'chat_room_settings_model.g.dart';
@freezed
abstract class ChatRoomSettingsModel with _$ChatRoomSettingsModel {
const factory ChatRoomSettingsModel({
- required String name,
+ @JsonKey(name: 'room_name') required String name,
required String state,
}) = _ChatRoomSettingsModel;
diff --git a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart
index f4c95d12..c4d8ed45 100644
--- a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart
+++ b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart
@@ -223,6 +223,7 @@ class ChatRoomCubit extends Cubit {
files: compressedFiles,
slug: userSlug,
);
+ sl().getChatRooms();
return true;
} catch (e, st) {
log(e.toString(), stackTrace: st);
diff --git a/lib/features/chat/presentation/pages/photo_view_screen.dart b/lib/features/chat/presentation/pages/photo_view_screen.dart
index 260c051d..1c17d40e 100644
--- a/lib/features/chat/presentation/pages/photo_view_screen.dart
+++ b/lib/features/chat/presentation/pages/photo_view_screen.dart
@@ -1,5 +1,3 @@
-import 'dart:io';
-
import 'package:cached_network_image/cached_network_image.dart';
import 'package:dismissible_page/dismissible_page.dart';
import 'package:eatvio_app/core/const.dart';
@@ -11,7 +9,7 @@ import 'package:photo_view/photo_view_gallery.dart';
import 'package:url_launcher/url_launcher.dart';
class PhotoViewScreen extends StatefulWidget {
- final List imageUrls;
+ final List imageUrls;
final int index;
final bool isLocal;
@@ -50,14 +48,12 @@ class _PhotoViewScreenState extends State {
),
scrollPhysics: const BouncingScrollPhysics(),
builder: (BuildContext context, int index) {
+ final imageProvider = widget.isLocal
+ ? FileImage(widget.imageUrls[index]) as ImageProvider