Skip to content

Commit

Permalink
fix: 이미지없는 경우 모아이미지로 대체
Browse files Browse the repository at this point in the history
  • Loading branch information
nain93 committed Aug 15, 2023
1 parent 958cca4 commit 31e9d1b
Show file tree
Hide file tree
Showing 20 changed files with 173 additions and 309 deletions.
7 changes: 7 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
45C9C16A0670A813CECFC93F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
56E94936F6AD3AEF98B40B4D /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
6D25B7232A20AF9400376B84 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
6D5BB09D2A8C0B3800C7BAA9 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
6DCA4EED2A15E5C200B62F90 /* Share Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Share Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
6DCA4EEF2A15E5C200B62F90 /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = "<group>"; };
6DCA4EF22A15E5C200B62F90 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -158,6 +159,7 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
6D5BB09D2A8C0B3800C7BAA9 /* Runner.entitlements */,
6D25B7232A20AF9400376B84 /* GoogleService-Info.plist */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
Expand Down Expand Up @@ -472,6 +474,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = XQ24HP64B3;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -709,6 +712,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/RunnerDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = XQ24HP64B3;
ENABLE_BITCODE = NO;
Expand All @@ -720,6 +725,7 @@
MARKETING_VERSION = 0.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.beside.moa;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand All @@ -734,6 +740,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = XQ24HP64B3;
ENABLE_BITCODE = NO;
Expand Down
20 changes: 20 additions & 0 deletions ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>moa:example.com</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.beside.moa</string>
</array>
</dict>
</plist>
2 changes: 2 additions & 0 deletions ios/Runner/RunnerDebug.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
Expand Down
2 changes: 1 addition & 1 deletion lib/models/folder_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class FolderModel with _$FolderModel {
const factory FolderModel({
required String folderId,
required String folderName,
String? thumbnailUrl,
required String thumbnailUrl,
required int count,
String? updatedDate,
}) = _FolderModel;
Expand Down
33 changes: 2 additions & 31 deletions lib/navigations/main_bottom_tab.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:moa_app/constants/app_constants.dart';
import 'package:moa_app/constants/color_constants.dart';
import 'package:moa_app/constants/file_constants.dart';
import 'package:moa_app/screens/add_content/folder_select.dart';
Expand All @@ -24,28 +21,6 @@ class MainBottomTab extends HookConsumerWidget {
bool keyboardIsOpen = MediaQuery.of(context).viewInsets.bottom == 0;
var lifeCycle = useAppLifecycleState();

void navigateToShareMedia(
BuildContext context, List<SharedMediaFile> value) {
if (value.isNotEmpty) {
var newFiles = <File>[];
for (var element in value) {
newFiles.add(File(
Platform.isIOS
? element.type == SharedMediaType.FILE
? element.path
.toString()
.replaceAll(AppConstants.replaceableText, '')
: element.path
: element.path,
));
}

context.push(
'${GoRoutes.fileSharing.fullPath}/$newFiles',
);
}
}

var receiveUrl = useState('');

void navigateToShareText(BuildContext context, String? value) {
Expand All @@ -58,16 +33,12 @@ class MainBottomTab extends HookConsumerWidget {
void listenShareMediaFiles(BuildContext context) {
// For sharing images coming from outside the app
// while the app is in the memory
ReceiveSharingIntent.getMediaStream().listen((value) {
navigateToShareMedia(context, value);
}, onError: (err) {
ReceiveSharingIntent.getMediaStream().listen((value) {}, onError: (err) {
debugPrint('$err');
});

// For sharing images coming from outside the app while the app is closed
ReceiveSharingIntent.getInitialMedia().then((value) {
navigateToShareMedia(context, value);
});
ReceiveSharingIntent.getInitialMedia().then((value) {});

// For sharing or opening urls/text coming from outside the app while the app is in the memory
ReceiveSharingIntent.getTextStream().listen((value) {
Expand Down
5 changes: 3 additions & 2 deletions lib/repositories/content_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class ContentRepository implements IContentRepository {
required String hashTagStringList,
}) async {
var token = await TokenRepository.instance.getToken();

if (contentType == AddContentType.image) {
/// 이미지 방식
await dio.post(
Expand All @@ -56,7 +55,9 @@ class ContentRepository implements IContentRepository {
'hashTag': hashTagStringList,
'contentType': 'IMAGE',
'originalFileName': '${content.contentName}.png',
'image': 'image/png:base64:${content.thumbnailImageUrl}',
'image': content.thumbnailImageUrl == ''
? ''
: 'image/png:base64:${content.thumbnailImageUrl}',
},
options: Options(
headers: {
Expand Down
1 change: 0 additions & 1 deletion lib/screens/add_content/add_link_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class AddLinkContent extends HookConsumerWidget {
return;
}

// todo 대표 이미지 미지정시 하트들고있는 모아 이미지로 대체
if (imageFile.value != null) {
imageError.value = '';
}
Expand Down
103 changes: 0 additions & 103 deletions lib/screens/file_sharing/file_sharing.dart

This file was deleted.

101 changes: 0 additions & 101 deletions lib/screens/file_sharing/user_listing_screen.dart

This file was deleted.

Loading

0 comments on commit 31e9d1b

Please sign in to comment.