From bbbf381d65dda27c2fc57d1d462c3c872f5edcbf Mon Sep 17 00:00:00 2001 From: MinhDV Date: Thu, 19 Oct 2023 16:25:09 +0700 Subject: [PATCH 1/3] TW-728 Remove Post UI on iOS --- ios/Twake Share/Info.plist | 4 ++-- ios/Twake Share/ShareViewController.swift | 16 ++-------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/ios/Twake Share/Info.plist b/ios/Twake Share/Info.plist index 528bcbc4a3..2a072500fd 100644 --- a/ios/Twake Share/Info.plist +++ b/ios/Twake Share/Info.plist @@ -45,8 +45,8 @@ Image - NSExtensionMainStoryboard - MainInterface + NSExtensionPrincipalClass + ShareViewController NSExtensionPointIdentifier com.apple.share-services diff --git a/ios/Twake Share/ShareViewController.swift b/ios/Twake Share/ShareViewController.swift index 11e5728d23..a2c158f769 100644 --- a/ios/Twake Share/ShareViewController.swift +++ b/ios/Twake Share/ShareViewController.swift @@ -3,7 +3,8 @@ import Social import MobileCoreServices import Photos -class ShareViewController: SLComposeServiceViewController { +@objc(ShareViewController) +class ShareViewController: UIViewController { // TODO: IMPORTANT: This should be your host app bundle identifier var hostAppBundleIdentifier = "com.linagora.ios.twake" let sharedKey = "ShareKey" @@ -31,10 +32,6 @@ class ShareViewController: SLComposeServiceViewController { appGroupId = (Bundle.main.object(forInfoDictionaryKey: "AppGroupId") as? String) ?? "group.\(hostAppBundleIdentifier)"; } - override func isContentValid() -> Bool { - return true - } - override func viewDidLoad() { super.viewDidLoad(); @@ -65,15 +62,6 @@ class ShareViewController: SLComposeServiceViewController { } } - override func didSelectPost() { - print("didSelectPost"); - } - - override func configurationItems() -> [Any]! { - // To add configuration options via table cells at the bottom of the sheet, return an array of SLComposeSheetConfigurationItem here. - return [] - } - private func handleText (content: NSExtensionItem, attachment: NSItemProvider, index: Int) { attachment.loadItem(forTypeIdentifier: textContentType, options: nil) { [weak self] data, error in From db18e12964d521e72bf0daa1ec5dd406859fee48 Mon Sep 17 00:00:00 2001 From: HuyNguyen Date: Fri, 20 Oct 2023 12:05:15 +0700 Subject: [PATCH 2/3] Fix size for chat list and logic --- lib/pages/chat_list/chat_list.dart | 1 + lib/pages/chat_list/chat_list_item.dart | 1 + lib/pages/chat_list/chat_list_item_style.dart | 2 ++ .../chat_list/chat_list_item_subtitle.dart | 9 +----- .../mixins/chat_list_item_mixin.dart | 28 +++++++------------ 5 files changed, 15 insertions(+), 26 deletions(-) diff --git a/lib/pages/chat_list/chat_list.dart b/lib/pages/chat_list/chat_list.dart index d306111d63..8fe838aec2 100644 --- a/lib/pages/chat_list/chat_list.dart +++ b/lib/pages/chat_list/chat_list.dart @@ -225,6 +225,7 @@ class ChatListController extends State Future actionWithToggleSelectMode(Function action) async { await action(); toggleSelectMode(); + _clearSelectionItem(); } void _clearSelectionItem() { diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index 6c75cba2a0..9e980bc327 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -107,6 +107,7 @@ class ChatListItem extends StatelessWidget with ChatListItemMixin { onSecondaryTap: onSecondaryTap, onLongPress: onLongPress, child: Container( + height: ChatListItemStyle.chatItemHeight, padding: ChatListItemStyle.paddingBody, child: Row( children: [ diff --git a/lib/pages/chat_list/chat_list_item_style.dart b/lib/pages/chat_list/chat_list_item_style.dart index effb7f8d86..a255fce456 100644 --- a/lib/pages/chat_list/chat_list_item_style.dart +++ b/lib/pages/chat_list/chat_list_item_style.dart @@ -10,6 +10,8 @@ class ChatListItemStyle { static const double mentionIconWidth = 20; + static const double chatItemHeight = 85; + static double unreadBadgeSize( bool unread, bool hasNewMessages, diff --git a/lib/pages/chat_list/chat_list_item_subtitle.dart b/lib/pages/chat_list/chat_list_item_subtitle.dart index 826341d138..583bcefc52 100644 --- a/lib/pages/chat_list/chat_list_item_subtitle.dart +++ b/lib/pages/chat_list/chat_list_item_subtitle.dart @@ -31,14 +31,7 @@ class ChatListItemSubtitle extends StatelessWidget with ChatListItemMixin { children: [ Expanded( child: typingText.isNotEmpty - ? Column( - children: [ - Flexible( - child: typingTextWidget(typingText, context), - ), - const Spacer(), - ], - ) + ? typingTextWidget(typingText, context) : (isGroup ? chatListItemSubtitleForGroup( room: room, diff --git a/lib/presentation/mixins/chat_list_item_mixin.dart b/lib/presentation/mixins/chat_list_item_mixin.dart index d25c525a7a..76de1b395b 100644 --- a/lib/presentation/mixins/chat_list_item_mixin.dart +++ b/lib/presentation/mixins/chat_list_item_mixin.dart @@ -42,26 +42,18 @@ mixin ChatListItemMixin { ); } - Row typingTextWidget(String typingText, BuildContext context) { + Widget typingTextWidget(String typingText, BuildContext context) { final displayedTypingText = "~ $typingText…"; - return Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Flexible( - child: Text( - displayedTypingText, - style: Theme.of(context).textTheme.labelLarge?.merge( - TextStyle( - overflow: TextOverflow.ellipsis, - color: Theme.of(context).colorScheme.primary, - ), - ), - maxLines: 2, - softWrap: true, + return Text( + displayedTypingText, + style: Theme.of(context).textTheme.labelLarge?.merge( + TextStyle( + overflow: TextOverflow.ellipsis, + color: Theme.of(context).colorScheme.primary, + ), ), - ), - ], + maxLines: 2, + softWrap: true, ); } From 7043f42143a659d30d2b7ec195e72f494f53cf70 Mon Sep 17 00:00:00 2001 From: Dat PHAM HOANG Date: Fri, 20 Oct 2023 13:40:04 +0700 Subject: [PATCH 3/3] Bump version to v2.3.5 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index a6a8aa30ee..e6108b3088 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: fluffychat description: The open digital workplace. publish_to: none -version: 2.3.4+2330 +version: 2.3.5+2330 environment: sdk: '>=3.0.0 <4.0.0'