Skip to content

ListenerRegistration should implement IDisposable #746

Description

@Thaina

Please fill in the following fields:

Unity editor version: All
Firebase Unity SDK version: At least 6.15.2 and lower
Source you installed the SDK (.unitypackage or Unity Package Manager): UPM
Firebase plugins in use (Auth, Database, etc.): FireStore

Please describe the issue here:

Some 3rd party made to be general listener (honestly https://github.com/neuecc/UniRx)

I want to use FireStore Listener API with it but then ListenerRegistration need to implement IDisposable for compatible with it

Could you please add it like this

	public sealed class ListenerRegistration : IDisposable
	{
		public Task ListenerTask { get; }

		public void Stop();
		public void Dispose() => listener.Stop();
	}

So I could use UniRX like so

	Observable.Create<QuerySnapshot>((observer) => {
		return colReference.Listen((snap) => observer.OnNext(snap));
	});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions