Merge branch 'develop' into fix/spacing

This commit is contained in:
Salvatore Giordano
2021-11-18 16:29:29 +01:00
committed by GitHub
8 changed files with 23 additions and 8 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ jobs:
flutter-version: ${{ env.flutter_version }} flutter-version: ${{ env.flutter_version }}
- name: "Install Tools" - name: "Install Tools"
run: flutter pub global activate melos 1.0.0-dev.6 run: flutter pub global activate melos 1.0.0-dev.10
- name: "Bootstrap Workspace" - name: "Bootstrap Workspace"
run: melos bootstrap run: melos bootstrap
@@ -31,7 +31,7 @@ jobs:
flutter-version: ${{ env.flutter_version }} flutter-version: ${{ env.flutter_version }}
- name: "Install Tools" - name: "Install Tools"
run: | run: |
flutter pub global activate melos 1.0.0-dev.6 flutter pub global activate melos 1.0.0-dev.10
- name: "Bootstrap Workspace" - name: "Bootstrap Workspace"
run: melos bootstrap run: melos bootstrap
- name: "Dart Analyze" - name: "Dart Analyze"
+7 -1
View File
@@ -1,3 +1,9 @@
## Upcoming
🐞 Fixed
- `closeConnection()` now uses `normalClosure` status when closing websocket.
## 3.2.0 ## 3.2.0
🐞 Fixed 🐞 Fixed
@@ -720,4 +726,4 @@
## 0.0.2 ## 0.0.2
- first beta version - first beta version
@@ -121,7 +121,8 @@ class WebSocket with TimerHelper {
_logger?.info('Closing connection with $baseUrl'); _logger?.info('Closing connection with $baseUrl');
if (_webSocketChannel != null) { if (_webSocketChannel != null) {
_unsubscribeFromWebSocketChannel(); _unsubscribeFromWebSocketChannel();
_webSocketChannel?.sink.close(status.goingAway); _webSocketChannel?.sink
.close(_manuallyClosed ? status.normalClosure : status.goingAway);
_webSocketChannel = null; _webSocketChannel = null;
} }
} }
+8 -1
View File
@@ -4,6 +4,13 @@
- `MessageListView` now allows more better control over spacing after messages using `spacingWidgetBuilder`. - `MessageListView` now allows more better control over spacing after messages using `spacingWidgetBuilder`.
## Upcoming
🐞 Fixed
- Fixed `MessageWidget` null errors associated with `channel.memberCount`.
- Fixed adding attachments on web.
## 3.2.0 ## 3.2.0
- Updated Dart SDK constraints to `>=2.14.0 <3.0.0` - Updated Dart SDK constraints to `>=2.14.0 <3.0.0`
@@ -866,4 +873,4 @@ The property showVideoFullScreen was added mainly because of this issue brianega
## 0.0.1 ## 0.0.1
- First release - First release
@@ -1,6 +1,7 @@
import 'package:characters/characters.dart'; import 'package:characters/characters.dart';
import 'package:diacritic/diacritic.dart'; import 'package:diacritic/diacritic.dart';
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/src/emoji/emoji.dart'; import 'package:stream_chat_flutter/src/emoji/emoji.dart';
import 'package:stream_chat_flutter/src/localization/translations.dart'; import 'package:stream_chat_flutter/src/localization/translations.dart';
@@ -46,7 +47,7 @@ extension IterableX<T> on Iterable<T> {
extension PlatformFileX on PlatformFile { extension PlatformFileX on PlatformFile {
/// Converts the [PlatformFile] into [AttachmentFile] /// Converts the [PlatformFile] into [AttachmentFile]
AttachmentFile get toAttachmentFile => AttachmentFile( AttachmentFile get toAttachmentFile => AttachmentFile(
path: path, path: kIsWeb ? null : path,
name: name, name: name,
bytes: bytes, bytes: bytes,
size: size, size: size,
@@ -1,7 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
@@ -1230,6 +1230,7 @@ class _MessageWidgetState extends State<MessageWidget>
Widget _buildSendingIndicator() { Widget _buildSendingIndicator() {
final style = widget.messageTheme.createdAtStyle; final style = widget.messageTheme.createdAtStyle;
final message = widget.message; final message = widget.message;
final memberCount = StreamChannel.of(context).channel.memberCount ?? 0;
if (hasNonUrlAttachments && if (hasNonUrlAttachments &&
(message.status == MessageSendingStatus.sending || (message.status == MessageSendingStatus.sending ||
@@ -1260,7 +1261,7 @@ class _MessageWidgetState extends State<MessageWidget>
if (isMessageRead) { if (isMessageRead) {
child = Row( child = Row(
children: [ children: [
if (StreamChannel.of(context).channel.memberCount! > 2) if (memberCount > 2)
Text( Text(
widget.readList!.length.toString(), widget.readList!.length.toString(),
style: style.copyWith( style: style.copyWith(