From 46c80731602e4e3595fded6e4ec13c1ddec5420b Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 26 May 2019 17:07:18 +0200 Subject: [PATCH] call stopLocationEngine() explicitly when stop shareing location for the last chat --- .../thoughtcrime/securesms/geolocation/DcLocationManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/org/thoughtcrime/securesms/geolocation/DcLocationManager.java b/src/org/thoughtcrime/securesms/geolocation/DcLocationManager.java index feb5538eb..12609b4fa 100644 --- a/src/org/thoughtcrime/securesms/geolocation/DcLocationManager.java +++ b/src/org/thoughtcrime/securesms/geolocation/DcLocationManager.java @@ -75,6 +75,9 @@ public class DcLocationManager implements Observer { public void stopSharingLocation(int chatId) { DcHelper.getContext(context).sendLocationsToChat(chatId, 0); + if(!DcHelper.getContext(context).isSendingLocationsToChat(0)) { + stopLocationEngine(); + } } public void shareLocation(int duration, int chatId) {