update flutter uikit to 1.3.2

This commit is contained in:
anonymous 2023-01-12 17:40:29 +08:00
parent 1d02ac67c2
commit e0bb3127c8
10 changed files with 70 additions and 27 deletions

View File

@ -1,4 +1,13 @@
## 1.3.2
* Fix: Text input field height, after choosing to mention someone.
## 1.3.1
* Optimize: Improve performance.
## 1.3.0
* Fix: Group tips not shows the nickname or remarks when transferring group owner.
* Optimize: Remove the confirmation pop-up before opening the file.
@ -11,8 +20,8 @@
## 1.1.0 And 1.1.0+1
* Add: Supports two new languages, Japanese and Korean.
* Add: Supports adding new other languages, apart from our default ones, including English, Chinese(Simplified and Traditional), Japanese and Korean, or modifying the translations, refers to [this documentation](https://www.tencentcloud.com/document/product/1047/52154).
* Add: Sticker plug-in has been embedded in TUIKit by default. Now we support three types of stickers, Unicode Emoji, small image emoji and big image stickers, the usage has been optimized, refers to [this documentation](https://www.tencentcloud.com/document/product/1047/52227).
* Add: Supports adding new other languages, apart from our default ones, including English, Chinese(Simplified and Traditional), Japanese and Korean, or modifying the translations, refers to [this documentation](https://www.tencentcloud.com/document/product/1047/52154?from=pub).
* Add: Sticker plug-in has been embedded in TUIKit by default. Now we support three types of stickers, Unicode Emoji, small image emoji and big image stickers, the usage has been optimized, refers to [this documentation](https://www.tencentcloud.com/document/product/1047/52227?from=pub).
* Optimize: Themes, more customization.
* Optimize: The animation of the input area, keyboard, sticker panel and the more panel.
* Optimize: Emoji, both Unicode and small images, can be inserted to any position in text messages.
@ -30,7 +39,7 @@
## 1.0.0
* Add: Support adding Flutter module to Native APP, for details, please refer to [this documentation](https://www.tencentcloud.com/document/product/1047/51456) to implement.
* Add: Support adding Flutter module to Native APP, for details, please refer to [this documentation](https://www.tencentcloud.com/document/product/1047/51456?from=pub) to implement.
* Add: Customize sticker and Emoji for text messages. For details, please refer to [this documentation](https://cloud.tencent.com/document/product/269/80882) to modify.
* Optimize: The loading duration for history message list, especially with lots of media and file messages.
* Optimize: More panel area supports scroll.

18
LICENSE
View File

@ -1,7 +1,6 @@
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@ -176,13 +175,24 @@
END OF TERMS AND CONDITIONS
Copyright 2013-2018 Docker, Inc.
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [2023] [Tencent]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -970,7 +970,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.3.0"
version: "1.3.2"
tencent_extended_text:
dependency: transitive
description:

View File

@ -26,9 +26,9 @@ class _TIMUIKitGroupTipsElemState extends TIMUIKitState<TIMUIKitGroupTipsElem> {
}
void getText() async {
setState(() async {
groupTipsAbstractText =
await MessageUtils.groupTipsMessageAbstract(widget.groupTipsElem, widget.groupMemberList);
final newText = await MessageUtils.groupTipsMessageAbstract(widget.groupTipsElem, widget.groupMemberList);
setState(() {
groupTipsAbstractText = newText;
});
}

View File

@ -874,8 +874,7 @@ class _InputTextFieldState extends TIMUIKitState<TIMUIKitInputTextField> {
showAtBackground: true,
)),
onChanged: (bool visibility) {
if (showKeyboard != visibility &&
visibility == false) {
if (showKeyboard != visibility) {
setState(() {
showKeyboard = visibility;
});

View File

@ -55,9 +55,9 @@ class _TIMUIKitLastMsgState extends TIMUIKitState<TIMUIKitLastMsg> {
"{{option1}}撤回了一条消息", "$option1撤回了一条消息")(option1: option1);
});
} else {
setState(() async {
groupTipsAbstractText =
await _getLastMsgShowText(widget.lastMsg, widget.context);
final newText = await _getLastMsgShowText(widget.lastMsg, widget.context);
setState(() {
groupTipsAbstractText = newText;
});
}
}

View File

@ -14,6 +14,7 @@ class TIMUIKitSearchInput extends StatefulWidget {
final Widget? prefixIcon;
final Widget? prefixText;
final bool? isAutoFocus;
final FocusNode focusNode;
const TIMUIKitSearchInput({
required this.onChange,
@ -23,6 +24,7 @@ class TIMUIKitSearchInput extends StatefulWidget {
this.prefixIcon,
this.isAutoFocus = true,
this.prefixText,
required this.focusNode,
}) : super(key: key);
@override
@ -30,7 +32,6 @@ class TIMUIKitSearchInput extends StatefulWidget {
}
class TIMUIKitSearchInputState extends TIMUIKitState<TIMUIKitSearchInput> {
late FocusNode focusNode = FocusNode();
late TextEditingController textEditingController =
widget.controller ?? TextEditingController();
bool isEmptyInput = true;
@ -43,7 +44,7 @@ class TIMUIKitSearchInputState extends TIMUIKitState<TIMUIKitSearchInput> {
}
hideAllPanel() {
focusNode.unfocus();
widget.focusNode.unfocus();
}
@override
@ -79,7 +80,7 @@ class TIMUIKitSearchInputState extends TIMUIKitState<TIMUIKitSearchInput> {
textInputAction: TextInputAction.search,
maxLines: 4,
minLines: 1,
focusNode: focusNode,
focusNode: widget.focusNode,
controller: textEditingController,
textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(

View File

@ -51,6 +51,7 @@ class TIMUIKitSearch extends StatefulWidget {
class TIMUIKitSearchState extends TIMUIKitState<TIMUIKitSearch> {
late TextEditingController textEditingController = TextEditingController();
final model = serviceLocator<TUISearchViewModel>();
final FocusNode focusNode = FocusNode();
GlobalKey<dynamic> inputTextField = GlobalKey();
List<SearchType> searchTypes = [
SearchType.group,
@ -96,6 +97,7 @@ class TIMUIKitSearchState extends TIMUIKitState<TIMUIKitSearch> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
TIMUIKitSearchInput(
focusNode: focusNode,
key: inputTextField,
isAutoFocus: widget.isAutoFocus,
onChange: (String value) {
@ -127,12 +129,25 @@ class TIMUIKitSearchState extends TIMUIKitState<TIMUIKitSearch> {
),
if (searchTypes.contains(SearchType.contact))
TIMUIKitSearchFriend(
onTapConversation: widget.onTapConversation,
onTapConversation: (conversation, message) {
focusNode.unfocus();
Future.delayed(const Duration(milliseconds: 100),
() {
widget.onTapConversation(conversation, message);
});
},
friendResultList: friendResultList),
if (searchTypes.contains(SearchType.group))
TIMUIKitSearchGroup(
groupList: groupList,
onTapConversation: widget.onTapConversation),
onTapConversation: (conversation, message) {
focusNode.unfocus();
Future.delayed(const Duration(milliseconds: 100),
() {
widget.onTapConversation(conversation, message);
});
},
),
if (searchTypes.contains(SearchType.history))
TIMUIKitSearchMsg(
onTapConversation: widget.onTapConversation,

View File

@ -41,6 +41,7 @@ class TIMUIKitSearchMsgDetailState
final model = serviceLocator<TUISearchViewModel>();
String keywordState = "";
int currentPage = 0;
final FocusNode focusNode = FocusNode();
@override
void initState() {
@ -96,10 +97,17 @@ class TIMUIKitSearchMsgDetailState
),
child: TIMUIKitSearchItem(
faceUrl: message.faceUrl ?? "",
showName: message.nickName ?? message.userID ?? message.sender ?? "",
lineOne: message.nickName ?? message.userID ?? message.sender ?? "",
showName: TencentUtils.checkString(message.nickName) ??
TencentUtils.checkString(message.userID) ??
message.sender ??
"",
lineOne: TencentUtils.checkString(message.nickName) ??
TencentUtils.checkString(message.userID) ??
message.sender ??
"",
lineTwo: _getMsgElem(message),
onClick: () {
focusNode.unfocus();
widget.onTapConversation(widget.currentConversation, message);
},
),
@ -165,6 +173,7 @@ class TIMUIKitSearchMsgDetailState
body: Column(
children: [
TIMUIKitSearchInput(
focusNode: focusNode,
isAutoFocus: widget.isAutoFocus,
onChange: (String value) {
updateMsgResult(value, true);

View File

@ -1,6 +1,6 @@
name: tencent_cloud_chat_uikit
description: UI components library and basic chat business logic for Tencent Cloud Chat service, helping you build In-APP Chat module easily.
version: 1.3.0
version: 1.3.2
homepage: https://www.tencentcloud.com/products/im?from=pub
repository: https://github.com/TencentCloud/tc-chat-uikit-flutter
documentation: https://comm.qq.com/im/doc/flutter/en/TUIKit/readme.html