From d7706f0e726572edec732bf4e0dde888b366f4e4 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 26 Jul 2020 11:02:40 +0200 Subject: [PATCH] Fixed stopping sent service when not monitoring operations --- app/src/main/java/eu/faircode/email/ServiceSend.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSend.java b/app/src/main/java/eu/faircode/email/ServiceSend.java index aec36e2cef..486e15a2d5 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSend.java +++ b/app/src/main/java/eu/faircode/email/ServiceSend.java @@ -99,6 +99,9 @@ public class ServiceSend extends ServiceBase { } catch (Throwable ex) { Log.w(ex); } + + if (unsent == null || unsent.count == 0) + stopSelf(); } } }); @@ -110,9 +113,6 @@ public class ServiceSend extends ServiceBase { if (operations == null) operations = new ArrayList<>(); - if (operations.size() == 0) - stopSelf(); - final List process = new ArrayList<>(); List ops = new ArrayList<>();