mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1017142 - Show old Sync users their synced tabs instead of new sync setup in remote tabs panel. r=nalexander
This commit is contained in:
parent
952d00602c
commit
ee3e698443
@ -5,9 +5,9 @@
|
||||
package org.mozilla.gecko.tabspanel;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
|
||||
import org.mozilla.gecko.fxa.FirefoxAccounts;
|
||||
import org.mozilla.gecko.fxa.login.State;
|
||||
import org.mozilla.gecko.sync.setup.SyncAccounts;
|
||||
import org.mozilla.gecko.tabspanel.TabsPanel.PanelView;
|
||||
|
||||
import android.content.Context;
|
||||
@ -79,10 +79,17 @@ class RemoteTabsPanel extends FrameLayout implements PanelView {
|
||||
}
|
||||
|
||||
private RemotePanelType getPanelTypeFromAccountState() {
|
||||
final State accountState = FirefoxAccounts.getFirefoxAccountState(getContext());
|
||||
final Context context = getContext();
|
||||
final State accountState = FirefoxAccounts.getFirefoxAccountState(context);
|
||||
if (accountState == null) {
|
||||
// If old Sync exists, we want to show their synced tabs,
|
||||
// rather than the new Sync setup screen.
|
||||
if (SyncAccounts.syncAccountsExist(context)) {
|
||||
return RemotePanelType.CONTAINER;
|
||||
} else {
|
||||
return RemotePanelType.SETUP;
|
||||
}
|
||||
}
|
||||
|
||||
if (accountState.getNeededAction() == State.Action.NeedsVerification) {
|
||||
return RemotePanelType.VERIFICATION;
|
||||
|
Loading…
Reference in New Issue
Block a user