Fixed bug where recyclerview got out of sync
This commit is contained in:
parent
a8956e9cd3
commit
b85ad208de
@ -134,7 +134,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
|||||||
private static final String TAG_TABS_FRAGMENT = "TAG_TABS_FRAGMENT";
|
private static final String TAG_TABS_FRAGMENT = "TAG_TABS_FRAGMENT";
|
||||||
|
|
||||||
// Static Layout
|
// Static Layout
|
||||||
@Bind(Window.ID_ANDROID_CONTENT) View mRoot;
|
|
||||||
@Bind(R.id.drawer_layout) DrawerLayout mDrawerLayout;
|
@Bind(R.id.drawer_layout) DrawerLayout mDrawerLayout;
|
||||||
@Bind(R.id.content_frame) FrameLayout mBrowserFrame;
|
@Bind(R.id.content_frame) FrameLayout mBrowserFrame;
|
||||||
@Bind(R.id.left_drawer) ViewGroup mDrawerLeft;
|
@Bind(R.id.left_drawer) ViewGroup mDrawerLeft;
|
||||||
@ -1310,7 +1309,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
|||||||
finalColor = color;
|
finalColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
final Window window = getWindow();
|
final Window window = getWindow();
|
||||||
if (!mShowTabsInDrawer) {
|
if (!mShowTabsInDrawer) {
|
||||||
window.setBackgroundDrawable(new ColorDrawable(Color.BLACK));
|
window.setBackgroundDrawable(new ColorDrawable(Color.BLACK));
|
||||||
|
@ -17,7 +17,9 @@ import acr.browser.lightning.app.BrowserApp;
|
|||||||
import acr.browser.lightning.constant.Constants;
|
import acr.browser.lightning.constant.Constants;
|
||||||
import acr.browser.lightning.controller.UIController;
|
import acr.browser.lightning.controller.UIController;
|
||||||
import acr.browser.lightning.preference.PreferenceManager;
|
import acr.browser.lightning.preference.PreferenceManager;
|
||||||
|
|
||||||
import com.anthonycr.bonsai.OnSubscribe;
|
import com.anthonycr.bonsai.OnSubscribe;
|
||||||
|
|
||||||
import acr.browser.lightning.utils.UrlUtils;
|
import acr.browser.lightning.utils.UrlUtils;
|
||||||
import acr.browser.lightning.view.LightningView;
|
import acr.browser.lightning.view.LightningView;
|
||||||
|
|
||||||
@ -61,14 +63,15 @@ public class BrowserPresenter {
|
|||||||
*/
|
*/
|
||||||
public void setupTabs(@Nullable Intent intent) {
|
public void setupTabs(@Nullable Intent intent) {
|
||||||
mTabsModel.initializeTabs((Activity) mView, intent, mIsIncognito)
|
mTabsModel.initializeTabs((Activity) mView, intent, mIsIncognito)
|
||||||
.subscribe(new OnSubscribe<Void>() {
|
.subscribe(new OnSubscribe<Void>() {
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
// At this point we always have at least a tab in the tab manager
|
// At this point we always have at least a tab in the tab manager
|
||||||
tabChanged(mTabsModel.last());
|
tabChanged(mTabsModel.last());
|
||||||
mView.updateTabNumber(mTabsModel.size());
|
mView.notifyTabViewAdded();
|
||||||
}
|
mView.updateTabNumber(mTabsModel.size());
|
||||||
});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,8 +165,8 @@ public class BrowserPresenter {
|
|||||||
boolean shouldClose = mShouldClose && isShown && Boolean.TRUE.equals(tabToDelete.getTag());
|
boolean shouldClose = mShouldClose && isShown && Boolean.TRUE.equals(tabToDelete.getTag());
|
||||||
final LightningView currentTab = mTabsModel.getCurrentTab();
|
final LightningView currentTab = mTabsModel.getCurrentTab();
|
||||||
if (mTabsModel.size() == 1 && currentTab != null &&
|
if (mTabsModel.size() == 1 && currentTab != null &&
|
||||||
(UrlUtils.isSpecialUrl(currentTab.getUrl()) ||
|
(UrlUtils.isSpecialUrl(currentTab.getUrl()) ||
|
||||||
currentTab.getUrl().equals(mPreferences.getHomepage()))) {
|
currentTab.getUrl().equals(mPreferences.getHomepage()))) {
|
||||||
mView.closeActivity();
|
mView.closeActivity();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user