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.
This commit is contained in:
Peter Serwylo 2017-04-05 16:42:58 +10:00
parent 24a6e9590d
commit 8faf151c90

View File

@ -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<Void>() {
@Override