From e26330a5bdc916a43f60c338b843dc9345817dcb Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Wed, 23 Mar 2016 20:20:40 -0400 Subject: [PATCH] Fixed threading bug in bookmark setting fragment, changed default bookmark title --- .../lightning/fragment/BookmarkSettingsFragment.java | 12 +++++++++--- app/src/main/res/raw/default_bookmarks.dat | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java b/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java index 981b36a..3246821 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java +++ b/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java @@ -162,9 +162,15 @@ public class BookmarkSettingsFragment extends PreferenceFragment implements Pref BrowserApp.getTaskThread().execute(new Runnable() { @Override public void run() { - Preference importStock = findPreference(SETTINGS_IMPORT_BROWSER); - importStock.setEnabled(getSync().isBrowserImportSupported()); - importStock.setOnPreferenceClickListener(BookmarkSettingsFragment.this); + final boolean isBrowserImportSupported = getSync().isBrowserImportSupported(); + Schedulers.main().execute(new Runnable() { + @Override + public void run() { + Preference importStock = findPreference(SETTINGS_IMPORT_BROWSER); + importStock.setEnabled(isBrowserImportSupported); + importStock.setOnPreferenceClickListener(BookmarkSettingsFragment.this); + } + }); } }); diff --git a/app/src/main/res/raw/default_bookmarks.dat b/app/src/main/res/raw/default_bookmarks.dat index 4607c15..7892341 100644 --- a/app/src/main/res/raw/default_bookmarks.dat +++ b/app/src/main/res/raw/default_bookmarks.dat @@ -1,4 +1,4 @@ -{"url": "https://twitter.com/RestainoAnthony", "title": "The Developer", "folder": "", "order": 0} +{"url": "https://twitter.com/RestainoAnthony", "title": "Contact Me", "folder": "", "order": 0} {"url": "https://www.facebook.com/", "title": "Facebook", "folder": "", "order": 2} {"url": "https://twitter.com", "title": "Twitter", "folder": "", "order": 3} {"url": "https://www.google.com/", "title": "Google", "folder": "", "order": 4}