remove redundant calls to "showTab"
This commit is contained in:
parent
c65cccb25c
commit
748397f1f0
@ -903,7 +903,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
|||||||
private synchronized void showTab(LightningView view) {
|
private synchronized void showTab(LightningView view) {
|
||||||
// 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);
|
||||||
if (view == null) {
|
if (view == null || (view == mCurrentView && !mCurrentView.isShown())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final float translation = mToolbarLayout.getTranslationY();
|
final float translation = mToolbarLayout.getTranslationY();
|
||||||
@ -1074,14 +1074,12 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
|||||||
}
|
}
|
||||||
if (current > position) {
|
if (current > position) {
|
||||||
mWebViewList.remove(position);
|
mWebViewList.remove(position);
|
||||||
showTab(mWebViewList.get(current - 1));
|
|
||||||
updateTabs();
|
updateTabs();
|
||||||
reference.onDestroy();
|
reference.onDestroy();
|
||||||
} else if (mWebViewList.size() > position + 1) {
|
} else if (mWebViewList.size() > position + 1) {
|
||||||
if (current == position) {
|
if (current == position) {
|
||||||
showTab(mWebViewList.get(position + 1));
|
showTab(mWebViewList.get(position + 1));
|
||||||
mWebViewList.remove(position);
|
mWebViewList.remove(position);
|
||||||
showTab(mWebViewList.get(position));
|
|
||||||
updateTabs();
|
updateTabs();
|
||||||
} else {
|
} else {
|
||||||
mWebViewList.remove(position);
|
mWebViewList.remove(position);
|
||||||
@ -1092,7 +1090,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
|||||||
if (current == position) {
|
if (current == position) {
|
||||||
showTab(mWebViewList.get(position - 1));
|
showTab(mWebViewList.get(position - 1));
|
||||||
mWebViewList.remove(position);
|
mWebViewList.remove(position);
|
||||||
showTab(mWebViewList.get(position - 1));
|
|
||||||
updateTabs();
|
updateTabs();
|
||||||
} else {
|
} else {
|
||||||
mWebViewList.remove(position);
|
mWebViewList.remove(position);
|
||||||
|
Loading…
Reference in New Issue
Block a user