added support for simultan downloads in files and talk, support for background downloads, enhanced loading in files with retry
This commit is contained in:
@@ -13,6 +13,7 @@ import '../../../../state/app/modules/chat/bloc/chat_bloc.dart';
|
||||
import '../../../../state/app/modules/settings/bloc/settings_cubit.dart';
|
||||
import '../../../../widget/async_action_button.dart';
|
||||
import '../../../../widget/details_bottom_sheet.dart';
|
||||
import '../../../../widget/downloads/download_tray.dart';
|
||||
import '../../../../widget/emoji_picker_dialog.dart';
|
||||
import '../../../../widget/file_pick.dart';
|
||||
import '../../../../widget/focus_behaviour.dart';
|
||||
@@ -34,8 +35,17 @@ class _ChatTextfieldState extends State<ChatTextfield> {
|
||||
final TextEditingController _textBoxController = TextEditingController();
|
||||
final AsyncActionController _sendController = AsyncActionController();
|
||||
final FocusNode _focusNode = FocusNode();
|
||||
final GlobalKey _sizeKey = GlobalKey();
|
||||
String? _sendError;
|
||||
|
||||
/// Publishes the input bar's measured height so the downloads chip floats
|
||||
/// above it instead of covering it.
|
||||
void _publishHeight() {
|
||||
if (!mounted) return;
|
||||
final height = _sizeKey.currentContext?.size?.height;
|
||||
if (height != null) downloadChipBottomObstruction.value = height;
|
||||
}
|
||||
|
||||
void share(List<String> uploadedRemotePaths) {
|
||||
shareFilesToChat(
|
||||
token: widget.sendToToken,
|
||||
@@ -104,6 +114,7 @@ class _ChatTextfieldState extends State<ChatTextfield> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
downloadChipBottomObstruction.value = 0;
|
||||
_sendController.dispose();
|
||||
_focusNode.dispose();
|
||||
super.dispose();
|
||||
@@ -236,7 +247,9 @@ class _ChatTextfieldState extends State<ChatTextfield> {
|
||||
}
|
||||
}
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => _publishHeight());
|
||||
return Stack(
|
||||
key: _sizeKey,
|
||||
children: <Widget>[
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
|
||||
Reference in New Issue
Block a user