From f72a3272cc451ac54d897b0d4770e0bcd46d1558 Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 6 Sep 2018 15:48:46 +0800 Subject: [PATCH] Check if routings is empty after update --- mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt b/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt index 94edb8b3..035cddae 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt @@ -92,6 +92,10 @@ class TetheringService : IpNeighbourMonitoringService(), UpstreamMonitor.Callbac } } } + if (routings.isEmpty()) { + updateRoutingsLocked() + return + } updateNotification() } app.handler.post { binder.fragment?.adapter?.notifyDataSetChanged() }