diff --git a/ios/Podfile b/ios/Podfile index 14540efe71..51d7f22cbe 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -33,9 +33,9 @@ target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) - target 'Twake Share' do - inherit! :search_paths - end +# target 'Twake Share' do +# inherit! :search_paths +# end end post_install do |installer| @@ -66,4 +66,4 @@ post_install do |installer| end end flutter_post_install(installer) if defined?(flutter_post_install) -end \ No newline at end of file +end diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 6dcf75f239..0416250a2c 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 60; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -86,7 +86,6 @@ C1005C45261071B5002F4F32 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1005C44261071B5002F4F32 /* ShareViewController.swift */; }; C1005C4C261071B5002F4F32 /* Twake Share.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = C1005C42261071B5002F4F32 /* Twake Share.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; C149567C25C7274F00A16396 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C149567B25C7274F00A16396 /* GoogleService-Info.plist */; }; - E388818A944B178F69E4431D /* Pods_Twake_Share.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB50B9422955BF92FC0FEB3C /* Pods_Twake_Share.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -271,8 +270,6 @@ 1B6C59111A74FF0BB750A10A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 216064C73ECC2AECB9F0A1FA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3D818CE626126D8D1C67A3C9 /* Pods-Twake Share.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Twake Share.release.xcconfig"; path = "Target Support Files/Pods-Twake Share/Pods-Twake Share.release.xcconfig"; sourceTree = ""; }; - 48F3E70A44AA65D69E70C12D /* Pods-Twake Share.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Twake Share.profile.xcconfig"; path = "Target Support Files/Pods-Twake Share/Pods-Twake Share.profile.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -284,14 +281,12 @@ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B16AB66899BBD65C9BFB2599 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BD7FC81DBDE4B0D093DEFFCB /* Pods-Twake Share.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Twake Share.debug.xcconfig"; path = "Target Support Files/Pods-Twake Share/Pods-Twake Share.debug.xcconfig"; sourceTree = ""; }; C1005C42261071B5002F4F32 /* Twake Share.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Twake Share.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; C1005C44261071B5002F4F32 /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = ""; }; C1005C49261071B5002F4F32 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C1005C53261072D4002F4F32 /* Twake Share.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Twake Share.entitlements"; sourceTree = ""; }; C149567B25C7274F00A16396 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; C149567D25C7276200A16396 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; - DB50B9422955BF92FC0FEB3C /* Pods_Twake_Share.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Twake_Share.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FDBA7311CF00074CB7786C33 /* 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 = ""; }; /* End PBXFileReference section */ @@ -325,7 +320,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E388818A944B178F69E4431D /* Pods_Twake_Share.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -458,7 +452,6 @@ isa = PBXGroup; children = ( B16AB66899BBD65C9BFB2599 /* Pods_Runner.framework */, - DB50B9422955BF92FC0FEB3C /* Pods_Twake_Share.framework */, ); name = Frameworks; sourceTree = ""; @@ -531,9 +524,6 @@ 1B6C59111A74FF0BB750A10A /* Pods-Runner.debug.xcconfig */, FDBA7311CF00074CB7786C33 /* Pods-Runner.release.xcconfig */, 216064C73ECC2AECB9F0A1FA /* Pods-Runner.profile.xcconfig */, - BD7FC81DBDE4B0D093DEFFCB /* Pods-Twake Share.debug.xcconfig */, - 3D818CE626126D8D1C67A3C9 /* Pods-Twake Share.release.xcconfig */, - 48F3E70A44AA65D69E70C12D /* Pods-Twake Share.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -583,6 +573,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 5F91C032622C7759B233FC58 /* [CP] Embed Pods Frameworks */, + 8A612791CBA199A3967BDAEC /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -599,7 +590,6 @@ isa = PBXNativeTarget; buildConfigurationList = C1005C51261071B5002F4F32 /* Build configuration list for PBXNativeTarget "Twake Share" */; buildPhases = ( - 265995452BC4DC2D49CADCC6 /* [CP] Check Pods Manifest.lock */, C1005C3E261071B5002F4F32 /* Sources */, C1005C3F261071B5002F4F32 /* Frameworks */, C1005C40261071B5002F4F32 /* Resources */, @@ -623,7 +613,7 @@ New, ); LastSwiftUpdateCheck = 1500; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 06EA9C142B21CDE000351529 = { @@ -674,9 +664,9 @@ mainGroup = 97C146E51CF9000F007C117D; packageReferences = ( 06EA9CA02B21CFC000351529 /* XCRemoteSwiftPackageReference "DTCoreText" */, - 06EA9CA32B21D09D00351529 /* XCRemoteSwiftPackageReference "DeviceKit" */, + 06EA9CA32B21D09D00351529 /* XCRemoteSwiftPackageReference "DeviceKit.git" */, 06EA9CA62B21D13300351529 /* XCRemoteSwiftPackageReference "matrix-rust-components-swift" */, - 06EA9CA92B21D17200351529 /* XCLocalSwiftPackageReference "NSE/DesignKit" */, + 06EA9CA92B21D17200351529 /* XCLocalSwiftPackageReference "DesignKit" */, 06EA9CAC2B21D2CA00351529 /* XCRemoteSwiftPackageReference "LRUCache" */, 06EA9CAF2B21D2FE00351529 /* XCRemoteSwiftPackageReference "KeychainAccess" */, 06EA9CB22B21D33700351529 /* XCRemoteSwiftPackageReference "Kingfisher" */, @@ -727,28 +717,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 265995452BC4DC2D49CADCC6 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Twake Share-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -782,6 +750,23 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + 8A612791CBA199A3967BDAEC /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -1192,7 +1177,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -1290,7 +1275,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -1340,7 +1325,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -1436,7 +1421,6 @@ }; C1005C4E261071B5002F4F32 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BD7FC81DBDE4B0D093DEFFCB /* Pods-Twake Share.debug.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -1477,7 +1461,6 @@ }; C1005C4F261071B5002F4F32 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3D818CE626126D8D1C67A3C9 /* Pods-Twake Share.release.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -1515,7 +1498,6 @@ }; C1005C50261071B5002F4F32 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 48F3E70A44AA65D69E70C12D /* Pods-Twake Share.profile.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -1597,7 +1579,7 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - 06EA9CA92B21D17200351529 /* XCLocalSwiftPackageReference "NSE/DesignKit" */ = { + 06EA9CA92B21D17200351529 /* XCLocalSwiftPackageReference "DesignKit" */ = { isa = XCLocalSwiftPackageReference; relativePath = NSE/DesignKit; }; @@ -1636,7 +1618,7 @@ version = 1.6.26; }; }; - 06EA9CA32B21D09D00351529 /* XCRemoteSwiftPackageReference "DeviceKit" */ = { + 06EA9CA32B21D09D00351529 /* XCRemoteSwiftPackageReference "DeviceKit.git" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/devicekit/DeviceKit.git"; requirement = { @@ -1701,7 +1683,7 @@ }; 06EA9CA42B21D09D00351529 /* DeviceKit */ = { isa = XCSwiftPackageProductDependency; - package = 06EA9CA32B21D09D00351529 /* XCRemoteSwiftPackageReference "DeviceKit" */; + package = 06EA9CA32B21D09D00351529 /* XCRemoteSwiftPackageReference "DeviceKit.git" */; productName = DeviceKit; }; 06EA9CA72B21D13300351529 /* MatrixRustSDK */ = { diff --git a/lib/pages/chat/chat_loading_view.dart b/lib/pages/chat/chat_loading_view.dart index e082f9dc3f..1e272554cb 100644 --- a/lib/pages/chat/chat_loading_view.dart +++ b/lib/pages/chat/chat_loading_view.dart @@ -1,5 +1,6 @@ import 'dart:math'; +import 'package:fluffychat/pages/chat/chat_loading_view_style.dart'; import 'package:fluffychat/pages/chat/chat_view_body_style.dart'; import 'package:flutter/material.dart'; import 'package:skeletons/skeletons.dart'; @@ -23,7 +24,7 @@ class ChatLoadingView extends StatelessWidget { itemBuilder: (context, index) { if (index < 3) { return Padding( - padding: const EdgeInsets.all(8.0), + padding: ChatLoadingViewStyle.padding(context), child: SkeletonItem( child: Row( crossAxisAlignment: CrossAxisAlignment.end, diff --git a/lib/pages/chat/chat_loading_view_style.dart b/lib/pages/chat/chat_loading_view_style.dart new file mode 100644 index 0000000000..979e01ffc2 --- /dev/null +++ b/lib/pages/chat/chat_loading_view_style.dart @@ -0,0 +1,12 @@ +import 'package:fluffychat/di/global/get_it_initializer.dart'; +import 'package:fluffychat/utils/responsive/responsive_utils.dart'; +import 'package:flutter/material.dart'; + +class ChatLoadingViewStyle { + static ResponsiveUtils responsive = getIt.get(); + + static EdgeInsets padding(BuildContext context) => EdgeInsets.symmetric( + vertical: 8, + horizontal: responsive.isMobile(context) ? 8 : 16, + ); +} diff --git a/lib/pages/chat/events/message/message.dart b/lib/pages/chat/events/message/message.dart index efc5b41e0e..1edf72aa60 100644 --- a/lib/pages/chat/events/message/message.dart +++ b/lib/pages/chat/events/message/message.dart @@ -317,22 +317,28 @@ class _MessageState extends State { } if (sameSender && !ownMessage) { - return FutureBuilder( - future: event.fetchSenderUser(), - builder: (context, snapshot) { - final user = snapshot.data ?? event.senderFromMemoryOrFallback; - return Avatar( - size: MessageStyle.avatarSize, - fontSize: MessageStyle.fontSize, - mxContent: user.avatarUrl, - name: user.calcDisplayname(), - onTap: () => widget.onAvatarTap!(event), - ); - }, + return Padding( + padding: MessageStyle.paddingAvatar, + child: FutureBuilder( + future: event.fetchSenderUser(), + builder: (context, snapshot) { + final user = snapshot.data ?? event.senderFromMemoryOrFallback; + return Avatar( + size: MessageStyle.avatarSize, + fontSize: MessageStyle.fontSize, + mxContent: user.avatarUrl, + name: user.calcDisplayname(), + onTap: () => widget.onAvatarTap!(event), + ); + }, + ), ); } - return const SizedBox(width: MessageStyle.avatarSize); + return const Padding( + padding: MessageStyle.paddingAvatar, + child: SizedBox(width: MessageStyle.avatarSize), + ); } Widget _messageSelectedWidget( @@ -342,7 +348,7 @@ class _MessageState extends State { ) { return Container( padding: EdgeInsets.only( - left: Message.responsiveUtils.isMobile(context) ? 8.0 : 16.0, + left: Message.responsiveUtils.isMobile(context) ? 8.0 : 0, ), color: widget.selected ? LinagoraSysColors.material().secondaryContainer diff --git a/lib/pages/chat/events/message/message_style.dart b/lib/pages/chat/events/message/message_style.dart index f0e411c257..be55b3e037 100644 --- a/lib/pages/chat/events/message/message_style.dart +++ b/lib/pages/chat/events/message/message_style.dart @@ -104,6 +104,10 @@ class MessageStyle { top: 4.0 * AppConfig.bubbleSizeFactor, ); + static const EdgeInsets paddingAvatar = EdgeInsets.only( + right: 8.0, + ); + static EdgeInsetsDirectional paddingMessageContainer( bool displayTime, BuildContext context, @@ -117,7 +121,6 @@ class MessageStyle { nextEvent, event, ), - start: 8, end: selected || responsiveUtils.isDesktop(context) ? 8 : 0, ); }