Skip to content

Commit

Permalink
Merge pull request #1221 from GetStream/refactor/prepare-for-v5
Browse files Browse the repository at this point in the history
refactor(ui,core): remove deprecated code and cleanup
  • Loading branch information
imtoori authored Jun 27, 2022
2 parents 338f907 + 8056eb9 commit f49f055
Show file tree
Hide file tree
Showing 132 changed files with 206 additions and 8,910 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/stream_flutter_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,27 @@ jobs:
uses: VeryGoodOpenSource/[email protected]
with:
path: packages/stream_chat/coverage/lcov.info
min_coverage: 80
min_coverage: 79
- name: "Stream Chat Persistence Coverage Check"
uses: VeryGoodOpenSource/[email protected]
with:
path: packages/stream_chat_localizations/coverage/lcov.info
min_coverage: 88
- name: "Stream Chat Persistence Coverage Check"
uses: VeryGoodOpenSource/[email protected]
with:
path: packages/stream_chat_persistence/coverage/lcov.info
min_coverage: 95
min_coverage: 97
- name: "Stream Chat Flutter Core Coverage Check"
uses: VeryGoodOpenSource/[email protected]
with:
path: packages/stream_chat_flutter_core/coverage/lcov.info
min_coverage: 90
min_coverage: 30
- name: "Stream Chat Flutter Coverage Check"
uses: VeryGoodOpenSource/[email protected]
with:
path: packages/stream_chat_flutter/coverage/lcov.info
min_coverage: 67
min_coverage: 68

draft-build:
runs-on: ubuntu-latest
Expand Down
4 changes: 0 additions & 4 deletions packages/stream_chat/lib/src/client/channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2078,10 +2078,6 @@ class ChannelClientState {
(m) => m.user?.id == _channel.client.state.currentUser?.id,
);

/// User role for the current user.
@Deprecated('Please use currentUserChannelRole')
String? get currentUserRole => currentUserMember?.role;

/// Channel role for the current user
String? get currentUserChannelRole => currentUserMember?.channelRole;

Expand Down
14 changes: 0 additions & 14 deletions packages/stream_chat/lib/src/core/api/requests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ class PaginationParams extends Equatable {
/// ```
const PaginationParams({
this.limit = 10,
this.before = 10,
this.after = 10,
this.offset,
this.next,
this.idAround,
Expand All @@ -88,14 +86,6 @@ class PaginationParams extends Equatable {
/// The amount of items requested from the APIs.
final int limit;

/// The amount of items requested before message ID from the APIs.
@Deprecated('before is deprecated, use limit instead')
final int before;

/// The amount of items requested after message ID from the APIs.
@Deprecated('after is deprecated, use limit instead')
final int after;

/// The offset of requesting items.
final int? offset;

Expand Down Expand Up @@ -165,8 +155,6 @@ class PaginationParams extends Equatable {
}) =>
PaginationParams(
limit: limit ?? this.limit,
before: before ?? this.before,
after: limit ?? this.after,
offset: offset ?? this.offset,
idAround: idAround ?? this.idAround,
next: next ?? this.next,
Expand All @@ -186,8 +174,6 @@ class PaginationParams extends Equatable {
@override
List<Object?> get props => [
limit,
before,
after,
offset,
next,
idAround,
Expand Down
4 changes: 0 additions & 4 deletions packages/stream_chat/lib/src/core/api/requests.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions packages/stream_chat/lib/src/core/models/member.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class Member extends Equatable {
this.inviteAcceptedAt,
this.inviteRejectedAt,
this.invited = false,
this.role,
this.channelRole,
this.userId,
this.isModerator = false,
Expand Down Expand Up @@ -48,10 +47,6 @@ class Member extends Equatable {
/// True if the user has been invited to the channel
final bool invited;

/// The role of the user in the channel
@Deprecated('Please use channelRole')
final String? role;

/// The role of this member in the channel
final String? channelRole;

Expand Down Expand Up @@ -100,7 +95,6 @@ class Member extends Equatable {
banned: banned ?? this.banned,
banExpires: banExpires ?? this.banExpires,
shadowBanned: shadowBanned ?? this.shadowBanned,
role: role ?? this.role,
channelRole: channelRole ?? this.channelRole,
userId: userId ?? this.userId,
isModerator: isModerator ?? this.isModerator,
Expand All @@ -117,7 +111,6 @@ class Member extends Equatable {
inviteAcceptedAt,
inviteRejectedAt,
invited,
role,
channelRole,
userId,
isModerator,
Expand Down
2 changes: 0 additions & 2 deletions packages/stream_chat/lib/src/core/models/member.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';

/// {@macro attachmentTitle}
@Deprecated("Use 'StreamAttachmentTitle' instead")
typedef AttachmentTitle = StreamAttachmentTitle;

/// {@template attachmentTitle}
/// Title for attachments
/// {@endtemplate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/src/utils/utils.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';

/// {@macro streamAttachmentUploadStateBuilder}
@Deprecated("Use 'StreamAttachmentsUploadStateBuilder' instead")
typedef AttachmentUploadStateBuilder = StreamAttachmentUploadStateBuilder;

/// {@template streamAttachmentUploadStateBuilder}
/// Widget to display attachment upload state
/// {@endtemplate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ enum AttachmentSource {
}
}

/// {@macro streamAttachmentWidget}
@Deprecated("Use 'StreamAttachmentWidget' instead")
typedef AttachmentWidget = StreamAttachmentWidget;

/// {@template streamAttachmentWidget}
/// Abstract class for deriving attachment types
/// {@endtemplate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import 'package:stream_chat_flutter/src/utils/utils.dart';
import 'package:stream_chat_flutter/src/video/video_thumbnail_image.dart';
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';

/// {@macro streamFileAttachment}
@Deprecated("Use 'StreamFileAttachment' instead")
typedef FileAttachment = StreamFileAttachment;

/// {@template streamFileAttachment}
/// Displays file attachments that have been sent in a chat.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import 'package:stream_chat_flutter/src/attachment/attachment_widget.dart';
import 'package:stream_chat_flutter/src/utils/utils.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';

/// {@macro streamGiphyAttachment}
@Deprecated("Use 'StreamGiphyAttachment' instead")
typedef GiphyAttachment = StreamGiphyAttachment;

/// {@template streamGiphyAttachment}
/// Shows a GIF attachment in a [StreamMessageWidget].
/// {@endtemplate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import 'package:shimmer/shimmer.dart';
import 'package:stream_chat_flutter/src/attachment/attachment_widget.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';

/// {@macro streamImageAttachment}
@Deprecated("use 'StreamImageAttachment' instead")
typedef ImageAttachment = StreamImageAttachment;

/// {@template streamImageAttachment}
/// Shows an image attachment in a [StreamMessageWidget].
/// {@endtemplate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';

/// {@macro streamUrlAttachment}
@Deprecated("Use 'StreamUrlAttachment' instead")
typedef UrlAttachment = StreamUrlAttachment;

/// {@template streamUrlAttachment}
/// Displays a URL attachment in a [StreamMessageWidget].
/// {@endtemplate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import 'package:stream_chat_flutter/src/attachment/attachment_widget.dart';
import 'package:stream_chat_flutter/src/video/video_thumbnail_image.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';

/// {@macro streamVideoAttachment}
@Deprecated("Use 'StreamVideoAttachment' instead")
typedef VideoAttachment = StreamVideoAttachment;

/// {@template streamVideoAttachment}
/// Shows a video attachment in a [StreamMessageWidget].
/// {@endtemplate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import 'dart:ui' as ui;

import 'package:flutter/material.dart';

/// {@macro streamGradientAvatar}
@Deprecated("Use 'StreamGradientAvatar' instead")
typedef GradientAvatar = StreamGradientAvatar;

/// {@template streamGradientAvatar}
/// Fallback user avatar with a polygon gradient overlaid with text
/// {@endtemplate}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';

/// {@macro streamGroupAvatar}
@Deprecated("Use 'StreamGroupAvatar' instead")
typedef GroupAvatar = StreamGroupAvatar;

/// {@template streamGroupAvatar}
/// Widget for constructing a group of images
/// {@endtemplate}
Expand Down
4 changes: 0 additions & 4 deletions packages/stream_chat_flutter/lib/src/avatars/user_avatar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';

/// {@macro streamUserAvatar}
@Deprecated("Use 'StreamUserAvatar' instead")
typedef UserAvatar = StreamUserAvatar;

/// {@template streamUserAvatar}
/// Displays a user's avatar.
/// {@endtemplate}
Expand Down
Loading

0 comments on commit f49f055

Please sign in to comment.