feat: Upgrade to 2.7.1

This commit is contained in:
vinsonswang 2024-09-02 18:48:32 +08:00
parent 9289b5c890
commit d3d70f1e6b
6 changed files with 5 additions and 37 deletions

View File

@ -173,7 +173,7 @@ class _TIMUIKitImageElem extends TIMUIKitState<TIMUIKitImageElem> {
if (model.getMessageProgress(widget.message.msgID) == 100) {
String savePath;
if (widget.message.imageElem!.path != null &&
widget.message.imageElem!.path != '') {
widget.message.imageElem!.path != '' && File(widget.message.imageElem!.path!).existsSync()) {
savePath = widget.message.imageElem!.path!;
} else {
savePath = model.getFileMessageLocation(widget.message.msgID);

View File

@ -209,7 +209,7 @@ class _TIMUIKitVideoElemState extends TIMUIKitState<TIMUIKitVideoElem> {
// context: context,
// mediaPath: localVideoUrl,
// onClickOrigin: () => launchDesktopFile(localVideoUrl));
} else if (videoPath != null) {
} else if (videoPath != null && File(videoPath).existsSync()) {
launchDesktopFile(videoPath);
// todo
// TUIKitWidePopup.showMedia(

View File

@ -339,7 +339,6 @@ class _MorePanelState extends TIMUIKitState<MorePanel> {
await plugin.getVideoThumbnail(
srcFile: originFile.path,
keepAspectRatio: true,
destFile: tempPath,
format: 'jpeg',
width: 128,
@ -472,35 +471,6 @@ class _MorePanelState extends TIMUIKitState<MorePanel> {
theme,
);
if (PlatformUtils().isAndroid) {
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
if ((androidInfo.version.sdkInt) >= 33) {
if (!await Permissions.checkPermission(
context,
Permission.photos.value,
theme,
)) {
return;
}
} else {
if (!await Permissions.checkPermission(
context,
Permission.storage.value,
theme,
)) {
return;
}
}
} else {
if (!await Permissions.checkPermission(
context,
Permission.photos.value,
theme,
)) {
return;
}
}
final convID = widget.conversationID;
final convType = widget.conversationType;
final pickedFile = await CameraPicker.pickFromCamera(context,

View File

@ -619,7 +619,6 @@ class _TIMUIKitTextFieldLayoutWideState extends TIMUIKitState<TIMUIKitTextFieldL
await plugin.getVideoThumbnail(
srcFile: originFile.path,
keepAspectRatio: true,
destFile: tempPath,
format: 'jpeg',
width: 128,
@ -679,7 +678,6 @@ class _TIMUIKitTextFieldLayoutWideState extends TIMUIKitState<TIMUIKitTextFieldL
String tempPath = (await getTemporaryDirectory()).path + p.basename(savePath) + ".jpeg";
await plugin.getVideoThumbnail(
srcFile: savePath,
keepAspectRatio: true,
destFile: tempPath,
format: 'jpeg',
width: 128,

View File

@ -162,7 +162,7 @@ class _VideoScreenState extends TIMUIKitState<VideoScreen> {
isAsset: true,
);
}
if (widget.videoElement.videoPath != '' && widget.videoElement.videoPath != null) {
if (widget.videoElement.videoPath != '' && widget.videoElement.videoPath != null && File(widget.videoElement.videoPath!).existsSync()) {
File f = File(widget.videoElement.videoPath!);
if (f.existsSync()) {
return await _saveNetworkVideo(

View File

@ -1,6 +1,6 @@
name: tencent_cloud_chat_uikit
description: A powerful chat UI component library and business logic for Tencent Cloud Chat, creating seamless in-app chat modules for delightful user experiences.
version: 2.7.0
version: 2.7.1
homepage: https://trtc.io/products/chat?utm_source=gfs&utm_medium=link&utm_campaign=%E6%B8%A0%E9%81%93&_channel_track_key=k6WgfCKn
repository: https://github.com/TencentCloud/chat-uikit-flutter
documentation: https://comm.qq.com/im/doc/flutter/en/TUIKit/readme.html
@ -63,7 +63,7 @@ dependencies:
tencent_keyboard_visibility: ^1.0.1
tim_ui_kit_sticker_plugin: ^3.2.0
tencent_im_base: ^8.0.0
fc_native_video_thumbnail: any
fc_native_video_thumbnail: ^0.11.1
path: ^1.8.1
tencent_cloud_uikit_core: ^1.6.0
pasteboard: ^0.2.0