|
|
@ -161,11 +161,12 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
private ValueCallback<Uri[]> mFilePathCallback; |
|
|
|
private ValueCallback<Uri[]> mFilePathCallback; |
|
|
|
|
|
|
|
|
|
|
|
// Primatives
|
|
|
|
// Primatives
|
|
|
|
private boolean mFullScreen, mColorMode, mDarkTheme, |
|
|
|
private boolean mFullScreen; |
|
|
|
mIsNewIntent = false, |
|
|
|
private boolean mDarkTheme; |
|
|
|
mIsFullScreen = false, |
|
|
|
private boolean mIsNewIntent = false; |
|
|
|
mIsImmersive = false, |
|
|
|
private boolean mIsFullScreen = false; |
|
|
|
mShowTabsInDrawer; |
|
|
|
private boolean mIsImmersive = false; |
|
|
|
|
|
|
|
private boolean mShowTabsInDrawer; |
|
|
|
private int mOriginalOrientation, mBackgroundColor, mIdGenerator, mIconColor, |
|
|
|
private int mOriginalOrientation, mBackgroundColor, mIdGenerator, mIconColor, |
|
|
|
mCurrentUiColor = Color.BLACK; |
|
|
|
mCurrentUiColor = Color.BLACK; |
|
|
|
private String mSearchText, mUntitledTitle, mHomepage, mCameraPhotoPath; |
|
|
|
private String mSearchText, mUntitledTitle, mHomepage, mCameraPhotoPath; |
|
|
@ -405,7 +406,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
if (!hasFocus && currentView != null) { |
|
|
|
if (!hasFocus && currentView != null) { |
|
|
|
setIsLoading(currentView.getProgress() < 100); |
|
|
|
setIsLoading(currentView.getProgress() < 100); |
|
|
|
updateUrl(currentView.getUrl(), true); |
|
|
|
updateUrl(currentView.getUrl(), true); |
|
|
|
} else if (hasFocus) { |
|
|
|
} else if (hasFocus && currentView != null) { |
|
|
|
String url = currentView.getUrl(); |
|
|
|
String url = currentView.getUrl(); |
|
|
|
if (url.startsWith(Constants.FILE)) { |
|
|
|
if (url.startsWith(Constants.FILE)) { |
|
|
|
mSearch.setText(""); |
|
|
|
mSearch.setText(""); |
|
|
@ -559,11 +560,11 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
|
|
|
|
|
|
|
|
private void initializePreferences() { |
|
|
|
private void initializePreferences() { |
|
|
|
final LightningView currentView = tabsManager.getCurrentTab(); |
|
|
|
final LightningView currentView = tabsManager.getCurrentTab(); |
|
|
|
final WebView currentWebView = currentView.getWebView(); |
|
|
|
final WebView currentWebView = tabsManager.getCurrentWebView(); |
|
|
|
mFullScreen = mPreferences.getFullScreenEnabled(); |
|
|
|
mFullScreen = mPreferences.getFullScreenEnabled(); |
|
|
|
mColorMode = mPreferences.getColorModeEnabled(); |
|
|
|
boolean colorMode = mPreferences.getColorModeEnabled(); |
|
|
|
mColorMode &= !mDarkTheme; |
|
|
|
colorMode &= !mDarkTheme; |
|
|
|
if (!isIncognito() && !mColorMode && !mDarkTheme && mWebpageBitmap != null) { |
|
|
|
if (!isIncognito() && !colorMode && !mDarkTheme && mWebpageBitmap != null) { |
|
|
|
changeToolbarBackground(mWebpageBitmap, null); |
|
|
|
changeToolbarBackground(mWebpageBitmap, null); |
|
|
|
} else if (!isIncognito() && currentView != null && !mDarkTheme |
|
|
|
} else if (!isIncognito() && currentView != null && !mDarkTheme |
|
|
|
&& currentView.getFavicon() != null) { |
|
|
|
&& currentView.getFavicon() != null) { |
|
|
@ -731,9 +732,11 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
findInPage(); |
|
|
|
findInPage(); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
case R.id.action_reading_mode: |
|
|
|
case R.id.action_reading_mode: |
|
|
|
|
|
|
|
if (currentView != null) { |
|
|
|
Intent read = new Intent(this, ReadingActivity.class); |
|
|
|
Intent read = new Intent(this, ReadingActivity.class); |
|
|
|
read.putExtra(Constants.LOAD_READING_URL, currentView.getUrl()); |
|
|
|
read.putExtra(Constants.LOAD_READING_URL, currentView.getUrl()); |
|
|
|
startActivity(read); |
|
|
|
startActivity(read); |
|
|
|
|
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
default: |
|
|
|
default: |
|
|
|
return super.onOptionsItemSelected(item); |
|
|
|
return super.onOptionsItemSelected(item); |
|
|
@ -822,6 +825,9 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
final WebView currentWebView = currentView != null ? currentView.getWebView() : null; |
|
|
|
final WebView currentWebView = currentView != null ? currentView.getWebView() : null; |
|
|
|
final LightningView newView = tabsManager.switchToTab(position); |
|
|
|
final LightningView newView = tabsManager.switchToTab(position); |
|
|
|
final WebView newWebView = newView != null ? newView.getWebView() : null; |
|
|
|
final WebView newWebView = newView != null ? newView.getWebView() : null; |
|
|
|
|
|
|
|
if (newView == null || newWebView == null) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Set the background color so the color mode color doesn't show through
|
|
|
|
// Set the background color so the color mode color doesn't show through
|
|
|
|
mBrowserFrame.setBackgroundColor(mBackgroundColor); |
|
|
|
mBrowserFrame.setBackgroundColor(mBackgroundColor); |
|
|
@ -946,7 +952,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
synchronized boolean newTab(String url, boolean show) { |
|
|
|
private synchronized boolean newTab(String url, boolean show) { |
|
|
|
// Limit number of tabs for limited version of app
|
|
|
|
// Limit number of tabs for limited version of app
|
|
|
|
if (!Constants.FULL_VERSION && tabsManager.size() >= 10) { |
|
|
|
if (!Constants.FULL_VERSION && tabsManager.size() >= 10) { |
|
|
|
Utils.showSnackbar(this, R.string.max_tabs); |
|
|
|
Utils.showSnackbar(this, R.string.max_tabs); |
|
|
@ -984,11 +990,8 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// What?
|
|
|
|
|
|
|
|
int current = tabsManager.positionOf(currentTab); |
|
|
|
int current = tabsManager.positionOf(currentTab); |
|
|
|
if (current < 0) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!tabToDelete.getUrl().startsWith(Constants.FILE) && !isIncognito()) { |
|
|
|
if (!tabToDelete.getUrl().startsWith(Constants.FILE) && !isIncognito()) { |
|
|
|
mPreferences.setSavedUrl(tabToDelete.getUrl()); |
|
|
|
mPreferences.setSavedUrl(tabToDelete.getUrl()); |
|
|
|
} |
|
|
|
} |
|
|
@ -1016,9 +1019,11 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
showTab(position - 1); |
|
|
|
showTab(position - 1); |
|
|
|
mEventBus.post(new BrowserEvents.TabsChanged()); |
|
|
|
mEventBus.post(new BrowserEvents.TabsChanged()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
tabsManager.deleteTab(position); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (currentTab.getUrl().startsWith(Constants.FILE) || currentTab.getUrl().equals(mHomepage)) { |
|
|
|
if (currentTab != null && (currentTab.getUrl().startsWith(Constants.FILE) |
|
|
|
|
|
|
|
|| currentTab.getUrl().equals(mHomepage))) { |
|
|
|
closeActivity(); |
|
|
|
closeActivity(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
tabsManager.deleteTab(position); |
|
|
|
tabsManager.deleteTab(position); |
|
|
@ -1130,7 +1135,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
void saveOpenTabs() { |
|
|
|
void saveOpenTabs() { |
|
|
|
if (mPreferences.getRestoreLostTabsEnabled()) { |
|
|
|
if (mPreferences.getRestoreLostTabsEnabled()) { |
|
|
|
final String s = tabsManager.tabsString(); |
|
|
|
final String s = tabsManager.tabsString(); |
|
|
|
mPreferences.setMemoryUrl(s.toString()); |
|
|
|
mPreferences.setMemoryUrl(s); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1192,8 +1197,8 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
} |
|
|
|
} |
|
|
|
String searchUrl = mSearchText + UrlUtils.QUERY_PLACE_HOLDER; |
|
|
|
String searchUrl = mSearchText + UrlUtils.QUERY_PLACE_HOLDER; |
|
|
|
query = query.trim(); |
|
|
|
query = query.trim(); |
|
|
|
currentTab.stopLoading(); |
|
|
|
|
|
|
|
if (currentTab != null) { |
|
|
|
if (currentTab != null) { |
|
|
|
|
|
|
|
currentTab.stopLoading(); |
|
|
|
loadUrlInCurrentView(UrlUtils.smartUrlFilter(query, true, searchUrl)); |
|
|
|
loadUrlInCurrentView(UrlUtils.smartUrlFilter(query, true, searchUrl)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1318,31 +1323,35 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
* previously searched URLs |
|
|
|
* previously searched URLs |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void initializeSearchSuggestions(final AutoCompleteTextView getUrl) { |
|
|
|
private void initializeSearchSuggestions(final AutoCompleteTextView getUrl) { |
|
|
|
final LightningView currentTab = tabsManager.getCurrentTab(); |
|
|
|
|
|
|
|
getUrl.setThreshold(1); |
|
|
|
getUrl.setThreshold(1); |
|
|
|
getUrl.setDropDownWidth(-1); |
|
|
|
getUrl.setDropDownWidth(-1); |
|
|
|
getUrl.setDropDownAnchor(R.id.toolbar_layout); |
|
|
|
getUrl.setDropDownAnchor(R.id.toolbar_layout); |
|
|
|
getUrl.setOnItemClickListener(new OnItemClickListener() { |
|
|
|
getUrl.setOnItemClickListener(new OnItemClickListener() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { |
|
|
|
public void onItemClick(AdapterView<?> adapterView, View view, int pos, long l) { |
|
|
|
try { |
|
|
|
String url = null; |
|
|
|
String url; |
|
|
|
CharSequence urlString = ((TextView) view.findViewById(R.id.url)).getText(); |
|
|
|
url = ((TextView) arg1.findViewById(R.id.url)).getText().toString(); |
|
|
|
if (urlString != null) { |
|
|
|
if (url.startsWith(BrowserActivity.this.getString(R.string.suggestion))) { |
|
|
|
url = urlString.toString(); |
|
|
|
url = ((TextView) arg1.findViewById(R.id.title)).getText().toString(); |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (url == null || url.startsWith(BrowserActivity.this.getString(R.string.suggestion))) { |
|
|
|
getUrl.setText(url); |
|
|
|
CharSequence searchString = ((TextView) view.findViewById(R.id.title)).getText(); |
|
|
|
|
|
|
|
if (searchString != null) { |
|
|
|
|
|
|
|
url = searchString.toString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (url == null) { |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
getUrl.setText(url); |
|
|
|
searchTheWeb(url); |
|
|
|
searchTheWeb(url); |
|
|
|
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); |
|
|
|
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); |
|
|
|
imm.hideSoftInputFromWindow(getUrl.getWindowToken(), 0); |
|
|
|
imm.hideSoftInputFromWindow(getUrl.getWindowToken(), 0); |
|
|
|
|
|
|
|
final LightningView currentTab = tabsManager.getCurrentTab(); |
|
|
|
if (currentTab != null) { |
|
|
|
if (currentTab != null) { |
|
|
|
currentTab.requestFocus(); |
|
|
|
currentTab.requestFocus(); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (NullPointerException e) { |
|
|
|
|
|
|
|
Log.e("Browser Error: ", "NullPointerException on item click"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
@ -1521,7 +1530,9 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
mFullscreenContainer.addView(mCustomView, COVER_SCREEN_PARAMS); |
|
|
|
mFullscreenContainer.addView(mCustomView, COVER_SCREEN_PARAMS); |
|
|
|
decor.addView(mFullscreenContainer, COVER_SCREEN_PARAMS); |
|
|
|
decor.addView(mFullscreenContainer, COVER_SCREEN_PARAMS); |
|
|
|
setFullscreen(true, true); |
|
|
|
setFullscreen(true, true); |
|
|
|
|
|
|
|
if (currentTab != null) { |
|
|
|
currentTab.setVisibility(View.GONE); |
|
|
|
currentTab.setVisibility(View.GONE); |
|
|
|
|
|
|
|
} |
|
|
|
if (view instanceof FrameLayout) { |
|
|
|
if (view instanceof FrameLayout) { |
|
|
|
if (((FrameLayout) view).getFocusedChild() instanceof VideoView) { |
|
|
|
if (((FrameLayout) view).getFocusedChild() instanceof VideoView) { |
|
|
|
mVideoView = (VideoView) ((FrameLayout) view).getFocusedChild(); |
|
|
|
mVideoView = (VideoView) ((FrameLayout) view).getFocusedChild(); |
|
|
@ -1633,18 +1644,22 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
* the newly created WebView. |
|
|
|
* the newly created WebView. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onCreateWindow(Message resultMsg) { |
|
|
|
public synchronized void onCreateWindow(Message resultMsg) { |
|
|
|
if (resultMsg == null) { |
|
|
|
if (resultMsg == null) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (newTab("", true)) { |
|
|
|
if (newTab("", true)) { |
|
|
|
// TODO Review this
|
|
|
|
LightningView newTab = tabsManager.getTabAtPosition(tabsManager.size() - 1); |
|
|
|
final WebView webView = tabsManager.getTabAtPosition(tabsManager.size() - 1).getWebView(); |
|
|
|
if (newTab != null) { |
|
|
|
|
|
|
|
final WebView webView = newTab.getWebView(); |
|
|
|
|
|
|
|
if (webView != null) { |
|
|
|
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; |
|
|
|
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; |
|
|
|
transport.setWebView(webView); |
|
|
|
transport.setWebView(webView); |
|
|
|
resultMsg.sendToTarget(); |
|
|
|
resultMsg.sendToTarget(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Closes the specified {@link LightningView}. This implements |
|
|
|
* Closes the specified {@link LightningView}. This implements |
|
|
@ -1666,8 +1681,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void hideActionBar() { |
|
|
|
public void hideActionBar() { |
|
|
|
final LightningView currentTab = tabsManager.getCurrentTab(); |
|
|
|
final WebView currentWebView = tabsManager.getCurrentWebView(); |
|
|
|
final WebView currentWebView = currentTab.getWebView(); |
|
|
|
|
|
|
|
if (mFullScreen) { |
|
|
|
if (mFullScreen) { |
|
|
|
if (mBrowserFrame.findViewById(R.id.toolbar_layout) == null) { |
|
|
|
if (mBrowserFrame.findViewById(R.id.toolbar_layout) == null) { |
|
|
|
mUiLayout.removeView(mToolbarLayout); |
|
|
|
mUiLayout.removeView(mToolbarLayout); |
|
|
@ -1675,21 +1689,21 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
mToolbarLayout.bringToFront(); |
|
|
|
mToolbarLayout.bringToFront(); |
|
|
|
Log.d(Constants.TAG, "Move view to browser frame"); |
|
|
|
Log.d(Constants.TAG, "Move view to browser frame"); |
|
|
|
mToolbarLayout.setTranslationY(0); |
|
|
|
mToolbarLayout.setTranslationY(0); |
|
|
|
|
|
|
|
if (currentWebView != null) { |
|
|
|
currentWebView.setTranslationY(mToolbarLayout.getHeight()); |
|
|
|
currentWebView.setTranslationY(mToolbarLayout.getHeight()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (mToolbarLayout == null || currentTab == null) |
|
|
|
} |
|
|
|
|
|
|
|
if (mToolbarLayout == null || currentWebView == null) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
final int height = mToolbarLayout.getHeight(); |
|
|
|
final int height = mToolbarLayout.getHeight(); |
|
|
|
final WebView view = currentWebView; |
|
|
|
|
|
|
|
if (mToolbarLayout.getTranslationY() > -0.01f) { |
|
|
|
if (mToolbarLayout.getTranslationY() > -0.01f) { |
|
|
|
Animation show = new Animation() { |
|
|
|
Animation show = new Animation() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void applyTransformation(float interpolatedTime, Transformation t) { |
|
|
|
protected void applyTransformation(float interpolatedTime, Transformation t) { |
|
|
|
float trans = (1.0f - interpolatedTime) * height; |
|
|
|
float trans = (1.0f - interpolatedTime) * height; |
|
|
|
mToolbarLayout.setTranslationY(trans - height); |
|
|
|
mToolbarLayout.setTranslationY(trans - height); |
|
|
|
if (view != null) |
|
|
|
currentWebView.setTranslationY(trans); |
|
|
|
view.setTranslationY(trans); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
show.setDuration(250); |
|
|
|
show.setDuration(250); |
|
|
@ -1791,25 +1805,27 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onClick(View v) { |
|
|
|
public void onClick(View v) { |
|
|
|
final LightningView currentTab = tabsManager.getCurrentTab(); |
|
|
|
final LightningView currentTab = tabsManager.getCurrentTab(); |
|
|
|
final WebView currentWebView = currentTab.getWebView(); |
|
|
|
if (currentTab == null) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
switch (v.getId()) { |
|
|
|
switch (v.getId()) { |
|
|
|
case R.id.arrow_button: |
|
|
|
case R.id.arrow_button: |
|
|
|
if (mSearch != null && mSearch.hasFocus()) { |
|
|
|
if (mSearch != null && mSearch.hasFocus()) { |
|
|
|
currentTab.requestFocus(); |
|
|
|
currentTab.requestFocus(); |
|
|
|
} else if (mShowTabsInDrawer) { |
|
|
|
} else if (mShowTabsInDrawer) { |
|
|
|
mDrawerLayout.openDrawer(mDrawerLeft); |
|
|
|
mDrawerLayout.openDrawer(mDrawerLeft); |
|
|
|
} else if (currentTab != null) { |
|
|
|
} else { |
|
|
|
currentTab.loadHomepage(); |
|
|
|
currentTab.loadHomepage(); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case R.id.button_next: |
|
|
|
case R.id.button_next: |
|
|
|
currentWebView.findNext(false); |
|
|
|
currentTab.findNext(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case R.id.button_back: |
|
|
|
case R.id.button_back: |
|
|
|
currentWebView.findNext(true); |
|
|
|
currentTab.findPrevious(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case R.id.button_quit: |
|
|
|
case R.id.button_quit: |
|
|
|
currentWebView.clearMatches(); |
|
|
|
currentTab.clearFindMatches(); |
|
|
|
mSearchBar.setVisibility(View.GONE); |
|
|
|
mSearchBar.setVisibility(View.GONE); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case R.id.action_reading: |
|
|
|
case R.id.action_reading: |
|
|
@ -1963,7 +1979,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
@Subscribe |
|
|
|
@Subscribe |
|
|
|
public void bookmarkChanged(final BookmarkEvents.BookmarkChanged event) { |
|
|
|
public void bookmarkChanged(final BookmarkEvents.BookmarkChanged event) { |
|
|
|
final LightningView currentTab = tabsManager.getCurrentTab(); |
|
|
|
final LightningView currentTab = tabsManager.getCurrentTab(); |
|
|
|
final WebView currentWebView = currentTab.getWebView(); |
|
|
|
|
|
|
|
if (currentTab != null && currentTab.getUrl().startsWith(Constants.FILE) |
|
|
|
if (currentTab != null && currentTab.getUrl().startsWith(Constants.FILE) |
|
|
|
&& currentTab.getUrl().endsWith(Constants.BOOKMARKS_FILENAME)) { |
|
|
|
&& currentTab.getUrl().endsWith(Constants.BOOKMARKS_FILENAME)) { |
|
|
|
currentTab.loadBookmarkpage(); |
|
|
|
currentTab.loadBookmarkpage(); |
|
|
@ -1981,7 +1996,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
@Subscribe |
|
|
|
@Subscribe |
|
|
|
public void bookmarkDeleted(final BookmarkEvents.Deleted event) { |
|
|
|
public void bookmarkDeleted(final BookmarkEvents.Deleted event) { |
|
|
|
final LightningView currentTab = tabsManager.getCurrentTab(); |
|
|
|
final LightningView currentTab = tabsManager.getCurrentTab(); |
|
|
|
final WebView currentWebView = currentTab.getWebView(); |
|
|
|
|
|
|
|
if (currentTab != null && currentTab.getUrl().startsWith(Constants.FILE) |
|
|
|
if (currentTab != null && currentTab.getUrl().startsWith(Constants.FILE) |
|
|
|
&& currentTab.getUrl().endsWith(Constants.BOOKMARKS_FILENAME)) { |
|
|
|
&& currentTab.getUrl().endsWith(Constants.BOOKMARKS_FILENAME)) { |
|
|
|
currentTab.loadBookmarkpage(); |
|
|
|
currentTab.loadBookmarkpage(); |
|
|
|