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