deleteFeedByStream method

Future<void> deleteFeedByStream(
  1. MediaStream stream
)

Implementation

Future<void> deleteFeedByStream(MediaStream stream) async {
  final index =
      streams.indexWhere((element) => element.stream!.id == stream.id);
  if (index == -1) {
    Logs().w('Didn\'t find the feed with stream id ${stream.id} to delete');
    return;
  }
  final wstream = streams.elementAt(index);
  onStreamRemoved.add(wstream);
  await deleteStream(wstream);
}