Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved CompositeSubscription #633

Merged
merged 1 commit into from
Sep 25, 2021

Conversation

BreX900
Copy link
Contributor

@BreX900 BreX900 commented Sep 24, 2021

  • CompositeSubscription's dispose, clear, and remove methods now return a completion future
  • Fixed an issue where a stream not present in CompositeSubscription was canceled
  • Added the ability not to cancel the stream when it is removed from CompositeSubscription

@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2021

Codecov Report

Merging #633 (d2f33d4) into master (c69bb00) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #633   +/-   ##
=======================================
  Coverage   92.94%   92.94%           
=======================================
  Files          74       74           
  Lines        2225     2225           
=======================================
  Hits         2068     2068           
  Misses        157      157           

@hoc081098 hoc081098 added the enhancement New feature or request label Sep 24, 2021
/// Remove the subscription from this composite and cancel it if it has been removed.
Future<void>? remove(
StreamSubscription<dynamic> subscription, {
bool canCancel = true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use bool shouldCancel = true :))

…w return a completion future

- Fixed an issue where a stream not present in CompositeSubscription was canceled
- Added the ability not to cancel the stream when it is removed from CompositeSubscription
@BreX900
Copy link
Contributor Author

BreX900 commented Sep 25, 2021

@hoc081098 Wouldn't it be more correct to use FutureOr<void> instead of Future<void>? ?

@hoc081098
Copy link
Collaborator

hoc081098 commented Sep 25, 2021

@hoc081098 Wouldn't it be more correct to use FutureOr<void> instead of Future<void>? ?

I think Future<void>? is good, since null-safety was enabled everywhere 😂

Copy link
Collaborator

@hoc081098 hoc081098 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@hoc081098 hoc081098 merged commit b614cec into ReactiveX:master Sep 25, 2021
@BreX900 BreX900 deleted the group_subscription branch September 25, 2021 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants