From 2b8e1cdcaa0c1d06977e364a3cc0b224abc6ee22 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Tue, 13 Apr 2021 19:19:37 +0300 Subject: [PATCH] Hide spinner after deleting an event --- AutoCat/Controllers/Location/EventsController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AutoCat/Controllers/Location/EventsController.swift b/AutoCat/Controllers/Location/EventsController.swift index b203a09..e11f170 100644 --- a/AutoCat/Controllers/Location/EventsController.swift +++ b/AutoCat/Controllers/Location/EventsController.swift @@ -199,7 +199,8 @@ class EventsController: UIViewController, UITableViewDataSource, UITableViewDele if let eventId = event.id { HUD.show(.progress) Api.remove(event: eventId).observeOn(MainScheduler.instance).subscribe(onSuccess: { vehicle in - completion?(self.update(vehicle: vehicle)) + let result = self.update(vehicle: vehicle) + completion?(result) }, onError: { error in completion?(false) HUD.show(error: error)