public void Dispose() { Task.Run(async() => await ChatViewModel.OnPageDisappearingAsync()); //// TODO: How to call async in Dispose??? Currently fire and forget!!! //Task.Run(async () => await _signallingServerService.DisposeAsync()); //_webRtcMiddleware.Dispose(); }
protected override async void OnDisappearing() { base.OnDisappearing(); Xamarin.Essentials.DeviceDisplay.KeepScreenOn = false; await _chatViewModel.OnPageDisappearingAsync(); }