remove deprecated stuff from older versions
This commit is contained in:
@@ -1344,14 +1344,6 @@ class Channel {
|
||||
return _client.unmuteChannel(cid!);
|
||||
}
|
||||
|
||||
/// Bans the user with given [userID] from the channel.
|
||||
@Deprecated("Use 'banMember' instead. This method will be removed in v4.0.0")
|
||||
Future<EmptyResponse> banUser(
|
||||
String userID,
|
||||
Map<String, dynamic> options,
|
||||
) =>
|
||||
banMember(userID, options);
|
||||
|
||||
/// Bans the member with given [userID] from the channel.
|
||||
Future<EmptyResponse> banMember(
|
||||
String userID,
|
||||
@@ -1366,12 +1358,6 @@ class Channel {
|
||||
return _client.banUser(userID, opts);
|
||||
}
|
||||
|
||||
/// Remove the ban for the user with given [userID] in the channel.
|
||||
@Deprecated(
|
||||
"Use 'unbanMember' instead. This method will be removed in v4.0.0",
|
||||
)
|
||||
Future<EmptyResponse> unbanUser(String userID) => unbanMember(userID);
|
||||
|
||||
/// Remove the ban for the member with given [userID] in the channel.
|
||||
Future<EmptyResponse> unbanMember(String userID) async {
|
||||
_checkInitialized();
|
||||
@@ -1840,10 +1826,6 @@ class ChannelClientState {
|
||||
}));
|
||||
}
|
||||
|
||||
/// Add a [message] to this [channelState].
|
||||
@Deprecated('Use updateMessage instead')
|
||||
void addMessage(Message message) => updateMessage(message);
|
||||
|
||||
/// Updates the [message] in the state if it exists. Adds it otherwise.
|
||||
void updateMessage(Message message) {
|
||||
if (message.parentId == null || message.showInChannel == true) {
|
||||
|
||||
@@ -29,7 +29,6 @@ import 'package:stream_chat/src/core/platform_detector/platform_detector.dart';
|
||||
import 'package:stream_chat/src/core/util/utils.dart';
|
||||
import 'package:stream_chat/src/db/chat_persistence_client.dart';
|
||||
import 'package:stream_chat/src/event_type.dart';
|
||||
import 'package:stream_chat/src/location.dart';
|
||||
import 'package:stream_chat/src/ws/connection_status.dart';
|
||||
import 'package:stream_chat/src/ws/websocket.dart';
|
||||
import 'package:stream_chat/version.dart';
|
||||
@@ -66,10 +65,6 @@ class StreamChatClient {
|
||||
this.logLevel = Level.WARNING,
|
||||
this.logHandlerFunction = StreamChatClient.defaultLogHandler,
|
||||
RetryPolicy? retryPolicy,
|
||||
@Deprecated('''
|
||||
Location is now deprecated in favor of the new edge server. Will be removed in v4.0.0.
|
||||
Read more here: https://getstream.io/blog/chat-edge-infrastructure
|
||||
''') Location? location,
|
||||
String? baseURL,
|
||||
Duration connectTimeout = const Duration(seconds: 6),
|
||||
Duration receiveTimeout = const Duration(seconds: 6),
|
||||
@@ -1559,18 +1554,6 @@ class ClientState {
|
||||
/// The current user as a stream
|
||||
Stream<OwnUser?> get currentUserStream => _currentUserController.stream;
|
||||
|
||||
// coverage:ignore-start
|
||||
|
||||
/// The current user
|
||||
@Deprecated('Use `.currentUser` instead, Will be removed in future releases')
|
||||
OwnUser? get user => _currentUserController.valueOrNull;
|
||||
|
||||
/// The current user as a stream
|
||||
@Deprecated(
|
||||
'Use `.currentUserStream` instead, Will be removed in future releases',
|
||||
)
|
||||
Stream<OwnUser?> get userStream => _currentUserController.stream;
|
||||
|
||||
// coverage:ignore-end
|
||||
|
||||
/// The current user
|
||||
|
||||
@@ -101,14 +101,6 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
vertical: 8,
|
||||
),
|
||||
this.attachmentPadding = EdgeInsets.zero,
|
||||
@Deprecated('''
|
||||
allRead is now deprecated and it will be removed in future releases.
|
||||
The MessageWidget now listens for read events on its own.
|
||||
''') this.allRead = false,
|
||||
@Deprecated('''
|
||||
readList is now deprecated and it will be removed in future releases.
|
||||
The MessageWidget now listens for read events on its own.
|
||||
''') this.readList,
|
||||
this.onQuotedMessageTap,
|
||||
this.customActions = const [],
|
||||
this.onAttachmentTap,
|
||||
@@ -347,9 +339,6 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
/// If true the widget will show the reactions
|
||||
final bool showReactions;
|
||||
|
||||
///
|
||||
final bool allRead;
|
||||
|
||||
/// If true the widget will show the thread reply indicator
|
||||
final bool showThreadReplyIndicator;
|
||||
|
||||
@@ -365,9 +354,6 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
/// Used in [StreamMessageReactionsModal] and [StreamMessageActionsModal]
|
||||
final bool showReactionPickerIndicator;
|
||||
|
||||
/// List of users who read
|
||||
final List<Read>? readList;
|
||||
|
||||
/// Callback when show message is tapped
|
||||
final ShowMessageCallback? onShowMessage;
|
||||
|
||||
|
||||
@@ -132,20 +132,6 @@ class StreamChatState extends State<StreamChat> {
|
||||
return defaultTheme.merge(themeData);
|
||||
}
|
||||
|
||||
// coverage:ignore-start
|
||||
|
||||
/// The current user
|
||||
@Deprecated('Use `.currentUser` instead, Will be removed in future releases')
|
||||
User? get user => widget.client.state.currentUser;
|
||||
|
||||
/// The current user as a stream
|
||||
@Deprecated(
|
||||
'Use `.currentUserStream` instead, Will be removed in future releases',
|
||||
)
|
||||
Stream<User?> get userStream => widget.client.state.currentUserStream;
|
||||
|
||||
// coverage:ignore-end
|
||||
|
||||
/// The current user
|
||||
User? get currentUser => widget.client.state.currentUser;
|
||||
|
||||
|
||||
@@ -190,8 +190,6 @@ class StreamMessageInput extends StatefulWidget {
|
||||
this.idleSendButton,
|
||||
this.activeSendButton,
|
||||
this.showCommandsButton = true,
|
||||
@Deprecated('''Use `userMentionsTileBuilder` instead. Will be removed in future release''')
|
||||
this.mentionsTileBuilder,
|
||||
this.userMentionsTileBuilder,
|
||||
this.maxAttachmentSize = _kDefaultMaxAttachmentSize,
|
||||
this.onError,
|
||||
@@ -271,9 +269,6 @@ class StreamMessageInput extends StatefulWidget {
|
||||
/// Send button widget in an active state
|
||||
final Widget? activeSendButton;
|
||||
|
||||
/// Customize the tile for the mentions overlay.
|
||||
final MentionTileBuilder? mentionsTileBuilder;
|
||||
|
||||
/// Customize the tile for the mentions overlay.
|
||||
final UserMentionTileBuilder? userMentionsTileBuilder;
|
||||
|
||||
@@ -1154,19 +1149,6 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
final renderObject = context.findRenderObject() as RenderBox;
|
||||
|
||||
var tileBuilder = widget.userMentionsTileBuilder;
|
||||
if (tileBuilder == null && widget.mentionsTileBuilder != null) {
|
||||
tileBuilder = (context, user) {
|
||||
final member = Member(
|
||||
user: user,
|
||||
userId: user.id,
|
||||
createdAt: user.createdAt,
|
||||
updatedAt: user.updatedAt,
|
||||
);
|
||||
return widget.mentionsTileBuilder!(context, member);
|
||||
};
|
||||
}
|
||||
|
||||
return LayoutBuilder(
|
||||
builder: (context, snapshot) => StreamUserMentionsOverlay(
|
||||
query: query,
|
||||
@@ -1177,7 +1159,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
||||
renderObject.size.width - 16,
|
||||
min(400, (snapshot.maxHeight - renderObject.size.height - 16).abs()),
|
||||
),
|
||||
mentionsTileBuilder: tileBuilder,
|
||||
mentionsTileBuilder: widget.userMentionsTileBuilder,
|
||||
onMentionUserTap: (user) {
|
||||
_effectiveController.addMentionedUser(user);
|
||||
splits[splits.length - 1] = user.name;
|
||||
|
||||
@@ -101,20 +101,6 @@ class StreamChatCoreState extends State<StreamChatCore>
|
||||
return widget.child;
|
||||
}
|
||||
|
||||
// coverage:ignore-start
|
||||
|
||||
/// The current user
|
||||
@Deprecated('Use `.currentUser` instead, Will be removed in future releases')
|
||||
User? get user => client.state.currentUser;
|
||||
|
||||
/// The current user as a stream
|
||||
@Deprecated(
|
||||
'Use `.currentUserStream` instead, Will be removed in future releases',
|
||||
)
|
||||
Stream<User?> get userStream => client.state.currentUserStream;
|
||||
|
||||
// coverage:ignore-end
|
||||
|
||||
/// The current user
|
||||
User? get currentUser => client.state.currentUser;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user