summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/fr/gouv/etalab/mastodon/services/LiveNotificationService.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/fr/gouv/etalab/mastodon/services/LiveNotificationService.java')
-rw-r--r--app/src/main/java/fr/gouv/etalab/mastodon/services/LiveNotificationService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/services/LiveNotificationService.java b/app/src/main/java/fr/gouv/etalab/mastodon/services/LiveNotificationService.java
index a9b3f2896..73fb20983 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/services/LiveNotificationService.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/services/LiveNotificationService.java
@@ -61,6 +61,8 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
import fr.gouv.etalab.mastodon.R;
import fr.gouv.etalab.mastodon.activities.MainActivity;
@@ -239,7 +241,7 @@ public class LiveNotificationService extends Service implements NetworkStateRece
if (ex != null) {
if( !canStartStream.containsKey(account.getAcct()+"@"+account.getInstance()) || canStartStream.get(account.getAcct()+"@"+account.getInstance())) {
canStartStream.put(account.getAcct()+"@"+account.getInstance(),false);
- new Handler().postDelayed(new Runnable() {
+ new Timer().schedule(new TimerTask() {
@Override
public void run() {
startStream(account);