From 8faf151c9038a3f9c8d7749ba9eced7c8ef2d1f0 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Wed, 5 Apr 2017 16:42:58 +1000 Subject: [PATCH] Remove 1 second pause between installing and updating UI. This was implemented before because the main screen of the three tab layout needed to update in response to the list of installed apps being installed. When we scan the list of installed apps upon starting F-Droid, we didn't want to have to requery for the list of installed apps every time we found a new installed app. For this reason, we "debounced" these requests (accumulated them for 1 second, and then let go of a notification only after 1 second of inactivity). This is no longer a feature, and so we can afford to fire the notification instantly. --- .../org/fdroid/fdroid/data/InstalledAppProviderService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/org/fdroid/fdroid/data/InstalledAppProviderService.java b/app/src/main/java/org/fdroid/fdroid/data/InstalledAppProviderService.java index 6f0dee7fb..67c92743b 100644 --- a/app/src/main/java/org/fdroid/fdroid/data/InstalledAppProviderService.java +++ b/app/src/main/java/org/fdroid/fdroid/data/InstalledAppProviderService.java @@ -21,7 +21,6 @@ import java.io.FilenameFilter; import java.security.NoSuchAlgorithmException; import java.util.List; import java.util.Map; -import java.util.concurrent.TimeUnit; import rx.functions.Action1; import rx.schedulers.Schedulers; @@ -64,7 +63,7 @@ public class InstalledAppProviderService extends IntentService { public void onCreate() { super.onCreate(); notifyEvents = PublishSubject.create(); - notifyEvents.debounce(1, TimeUnit.SECONDS) + notifyEvents .subscribeOn(Schedulers.newThread()) .subscribe(new Action1() { @Override