Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #6190 - update local ui after fxa profile updates in the webview #6365

Merged
merged 4 commits into from
Apr 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RustFxA/FxAWebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ fileprivate enum RemoteCommand: String {
case changePassword = "fxaccounts:change_password"
case signOut = "fxaccounts:logout"
case deleteAccount = "fxaccounts:delete_account"
case profileChanged = "profile:change"
}

/**
Expand Down Expand Up @@ -158,6 +159,8 @@ extension FxAWebView: WKScriptMessageHandler {
case .deleteAccount, .signOut:
profile.removeAccount()
dismiss(animated: true)
case .profileChanged:
RustFirefoxAccounts.shared.accountManager.refreshProfile(forceRefresh: true)
}
}
}
Expand Down