From aec90b4ae237568a730029f077d3606104840c23 Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Thu, 3 Nov 2016 20:06:46 -0400 Subject: [PATCH 1/5] Fixed threading issue with all bookmarks list --- .../lightning/search/SuggestionsAdapter.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java b/app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java index 0cac61f..f1dfc16 100644 --- a/app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java +++ b/app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java @@ -15,6 +15,13 @@ import android.widget.Filterable; import android.widget.ImageView; import android.widget.TextView; +import com.anthonycr.bonsai.Action; +import com.anthonycr.bonsai.Observable; +import com.anthonycr.bonsai.OnSubscribe; +import com.anthonycr.bonsai.Scheduler; +import com.anthonycr.bonsai.Schedulers; +import com.anthonycr.bonsai.Subscriber; + import java.io.File; import java.io.FilenameFilter; import java.util.ArrayList; @@ -33,14 +40,6 @@ import acr.browser.lightning.database.BookmarkManager; import acr.browser.lightning.database.HistoryDatabase; import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.preference.PreferenceManager; - -import com.anthonycr.bonsai.Action; -import com.anthonycr.bonsai.Observable; -import com.anthonycr.bonsai.OnSubscribe; -import com.anthonycr.bonsai.Scheduler; -import com.anthonycr.bonsai.Schedulers; -import com.anthonycr.bonsai.Subscriber; - import acr.browser.lightning.utils.ThemeUtils; public class SuggestionsAdapter extends BaseAdapter implements Filterable { @@ -99,8 +98,16 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable { } public void refreshBookmarks() { - mAllBookmarks.clear(); - mAllBookmarks.addAll(mBookmarkManager.getAllBookmarks(true)); + Observable.create(new Action() { + @Override + public void onSubscribe(@NonNull Subscriber subscriber) { + mAllBookmarks.clear(); + mAllBookmarks.addAll(mBookmarkManager.getAllBookmarks(true)); + + subscriber.onComplete(); + } + }).subscribeOn(Schedulers.io()) + .subscribe(); } @Override From 928b12619ae62f3d454c1d04c3abf47067705986 Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Thu, 3 Nov 2016 22:55:06 -0400 Subject: [PATCH 2/5] Fixed bug where links wouldn't open correctly in the browser --- .../java/acr/browser/lightning/activity/TabsManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/acr/browser/lightning/activity/TabsManager.java b/app/src/main/java/acr/browser/lightning/activity/TabsManager.java index 622bcd2..08c85a6 100644 --- a/app/src/main/java/acr/browser/lightning/activity/TabsManager.java +++ b/app/src/main/java/acr/browser/lightning/activity/TabsManager.java @@ -135,7 +135,11 @@ public class TabsManager { if (mPreferenceManager.getRestoreLostTabsEnabled()) { restoreLostTabs(url, activity, subscriber); } else { - newTab(activity, null, false); + if (!TextUtils.isEmpty(url)) { + newTab(activity, url, false); + } else { + newTab(activity, null, false); + } finishInitialization(); subscriber.onComplete(); } From 22ccb6836ebbe5da2417727427b444dc194c6b11 Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Sat, 5 Nov 2016 00:08:40 -0400 Subject: [PATCH 3/5] 4.4.1 hotfix version update --- app/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6210bca..2ae1a3c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 24 - versionName "4.4.0" + versionName "4.4.1" vectorDrawables.useSupportLibrary = true } @@ -36,13 +36,13 @@ android { lightningPlus { buildConfigField "boolean", "FULL_VERSION", "true" applicationId "acr.browser.lightning" - versionCode 89 + versionCode 90 } lightningLite { buildConfigField "boolean", "FULL_VERSION", "false" applicationId "acr.browser.barebones" - versionCode 91 + versionCode 92 } } From 6070885be53ecd745db6a6594409d28363358037 Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Sun, 6 Nov 2016 11:30:06 -0500 Subject: [PATCH 4/5] Update Bonsai library to latest --- Bonsai | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bonsai b/Bonsai index 53608c0..68eb7eb 160000 --- a/Bonsai +++ b/Bonsai @@ -1 +1 @@ -Subproject commit 53608c03b77d598aaebd17eb0acbedd8ffb1bf51 +Subproject commit 68eb7eb377803f7971baedb28144aa3b1c420cd0 From 92676ca5fe07d897d9c416322cfd667a55a0c207 Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Sun, 6 Nov 2016 11:37:47 -0500 Subject: [PATCH 5/5] Update AnimatedProgressBar library --- AnimatedProgressBar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AnimatedProgressBar b/AnimatedProgressBar index 2d7f756..e7d6ec2 160000 --- a/AnimatedProgressBar +++ b/AnimatedProgressBar @@ -1 +1 @@ -Subproject commit 2d7f756be8f562b2cedca46de7d2ff24f9383040 +Subproject commit e7d6ec28baac7cc6909466fc0c8fc8c5e3de6f9d