Skip to content

Commit

Permalink
Merge pull request #202 from Monday-Rocket/develop
Browse files Browse the repository at this point in the history
1.0.50 업데이트
  • Loading branch information
boring-km authored Nov 10, 2023
2 parents 5da87ae + 1a37cd7 commit 773aa42
Show file tree
Hide file tree
Showing 14 changed files with 166 additions and 128 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2.8.0
with:
flutter-version: '3.13.6'
flutter-version: '3.13.9'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.2'
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
java-version: '11.x'
- uses: subosito/flutter-action@v2.8.0
with:
flutter-version: '3.13.6'
flutter-version: '3.13.9'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.2'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2.8.0
with:
flutter-version: '3.13.3'
flutter-version: '3.13.6'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.2'
Expand Down
50 changes: 34 additions & 16 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,14 @@
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
06D908F3BF919B7EE15A8705 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EC1CF9000F007C117D /* Resources */,
AEE2471C28CF82200092F192 /* Embed App Extensions */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
242C769F86A7805781E3C954 /* [CP] Embed Pods Frameworks */,
AEE2471C28CF82200092F192 /* Embed App Extensions */,
);
buildRules = (
);
Expand All @@ -384,7 +384,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1340;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
0F872E3A28D875E3002954CC = {
Expand Down Expand Up @@ -609,9 +609,11 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = T583WJWNAK;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Extension/Info.plist;
Expand All @@ -629,6 +631,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp.Extension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp.Extension";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_EMIT_LOC_STRINGS = YES;
Expand All @@ -648,9 +651,11 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = T583WJWNAK;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Extension/Info.plist;
Expand All @@ -667,6 +672,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp.Extension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp.Extension";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
Expand All @@ -684,9 +690,11 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = T583WJWNAK;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Extension/Info.plist;
Expand All @@ -703,6 +711,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp.Extension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp.Extension";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -771,9 +780,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = T583WJWNAK;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand All @@ -784,6 +795,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down Expand Up @@ -914,9 +926,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = T583WJWNAK;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand All @@ -927,6 +941,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand All @@ -947,9 +962,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = T583WJWNAK;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand All @@ -960,6 +977,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down
7 changes: 2 additions & 5 deletions lib/cubits/folders/get_my_folders_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ class GetFoldersCubit extends Cubit<FoldersState> {
try {
emit(FolderLoadingState());

final result = await folderApi.getMyFolders();
result.when(
(await folderApi.getMyFolders()).when(
success: (list) {
folders = list;
emit(FolderLoadedState(folders));
Expand All @@ -41,8 +40,7 @@ class GetFoldersCubit extends Cubit<FoldersState> {
try {
emit(FolderLoadingState());

final result = await folderApi.getMyFoldersWithoutUnclassified();
result.when(
(await folderApi.getMyFoldersWithoutUnclassified()).when(
success: (list) {
folders = list;
emit(FolderLoadedState(folders));
Expand Down Expand Up @@ -78,7 +76,6 @@ class GetFoldersCubit extends Cubit<FoldersState> {
void filter(String name) {
if (name.isEmpty) {
emit(FolderLoadedState(folders));
return;
} else {
final filtered = <Folder>[];

Expand Down
29 changes: 29 additions & 0 deletions lib/cubits/login/auto_login_cubit.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import 'package:ac_project_app/cubits/login/login_user_state.dart';
import 'package:ac_project_app/di/set_up_get_it.dart';
import 'package:ac_project_app/provider/api/user/user_api.dart';
import 'package:ac_project_app/provider/share_data_provider.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

class AutoLoginCubit extends Cubit<LoginUserState> {
AutoLoginCubit() : super(LoginInitialState());

void userCheck() {
final user = FirebaseAuth.instance.currentUser;
if (user != null) {
getIt<UserApi>().postUsers().then((result) {
result.when(
success: (data) {
if (data.is_new ?? false) {
emit(LoginInitialState());
} else {
ShareDataProvider.loadServerDataAtFirst();
emit(LoginLoadedState(data));
}
},
error: (_) => emit(LoginInitialState()),
);
});
}
}
}
10 changes: 5 additions & 5 deletions lib/di/set_up_get_it.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:ac_project_app/cubits/folders/get_user_folders_cubit.dart';
import 'package:ac_project_app/cubits/login/auto_login_cubit.dart';
import 'package:ac_project_app/cubits/profile/profile_info_cubit.dart';
import 'package:ac_project_app/provider/api/custom_client.dart';
import 'package:ac_project_app/provider/api/folders/folder_api.dart';
Expand All @@ -20,11 +21,10 @@ void locator() {
..registerLazySingleton(() => LinkApi(httpClient))
..registerLazySingleton(() => ReportApi(httpClient))
..registerLazySingleton(() => ProfileApi(httpClient))
..registerLazySingleton(() => UserApi(httpClient));

..registerLazySingleton(() => UserApi(httpClient))

// Cubits
final profileCubit = GetProfileInfoCubit();
getIt..registerLazySingleton(GetUserFoldersCubit.new)
..registerLazySingleton(() => profileCubit);
..registerLazySingleton(GetUserFoldersCubit.new)
..registerLazySingleton(GetProfileInfoCubit.new)
..registerLazySingleton(AutoLoginCubit.new);
}
7 changes: 1 addition & 6 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,10 @@ class MyApp extends StatelessWidget {
),
);

return MultiPlatformApp.create();
}
}

class MultiPlatformApp {
static Widget create() {
return ScreenUtilInit(
designSize: const Size(393, 852),
minTextAdapt: true,
useInheritedMediaQuery: true,
builder: (context, child) {
return MultiBlocProvider(
providers: globalProviders,
Expand Down
16 changes: 16 additions & 0 deletions lib/provider/tutorial_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'package:shared_preferences/shared_preferences.dart';

void checkTutorial2({
required void Function() onMoveToTutorialView,
required void Function() onMoveToNextView,
}) {
SharedPreferences.getInstance().then((SharedPreferences prefs) {
final tutorial = prefs.getBool('tutorial2') ?? false;
if (tutorial) {
prefs.setBool('tutorial2', false);
onMoveToTutorialView();
} else {
onMoveToNextView();
}
});
}
2 changes: 1 addition & 1 deletion lib/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Pages {
case Routes.report:
return router.create(child: const ReportView());
case Routes.upload:
return router.create(child: const UploadView());
return router.create(child: UploadView(args: arguments as Map<String, dynamic>?));
case Routes.tutorial:
return router.create(child: const TutorialView());
default:
Expand Down
21 changes: 20 additions & 1 deletion lib/ui/view/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import 'package:ac_project_app/di/set_up_get_it.dart';
import 'package:ac_project_app/gen/assets.gen.dart';
import 'package:ac_project_app/provider/api/folders/folder_api.dart';
import 'package:ac_project_app/provider/kakao/kakao.dart';
import 'package:ac_project_app/routes.dart';
import 'package:ac_project_app/ui/page/home/home_page.dart';
import 'package:ac_project_app/ui/page/my_folder/my_folder_page.dart';
import 'package:ac_project_app/ui/page/my_page/my_page.dart';
import 'package:ac_project_app/util/get_arguments.dart';
import 'package:ac_project_app/util/url_valid.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
Expand All @@ -41,6 +44,7 @@ class _HomeViewState extends State<HomeView> with WidgetsBindingObserver {
if (!mounted) return;
Kakao.receiveLink(context, url: url);
});
checkClipboardLink();
super.initState();
}

Expand All @@ -54,11 +58,26 @@ class _HomeViewState extends State<HomeView> with WidgetsBindingObserver {
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.resumed) {
getIt<FolderApi>().bulkSave();

Kakao.receiveLink(context);
}
}

void checkClipboardLink() {
Clipboard.getData(Clipboard.kTextPlain).then((value) {
isValidUrl(value?.text ?? '').then((isValid) {
if (isValid) {
Navigator.pushNamed(
context,
Routes.upload,
arguments: {
'url': value?.text,
},
);
}
});
});
}

@override
Widget build(BuildContext context) {
final args = getArguments(context);
Expand Down
1 change: 1 addition & 0 deletions lib/ui/view/links/link_detail_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class LinkDetailView extends StatelessWidget {
bool linkVisible,
) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
Expand Down
Loading

0 comments on commit 773aa42

Please sign in to comment.