File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
ios/brave-ios/Sources/Brave/Frontend
Browser/BrowserViewController Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -209,12 +209,12 @@ class BraveTranslateTabHelper: NSObject {
209209 // Cache CSS and JS requests
210210 Self . requestCache [ request. url] = ( data, response)
211211
212- if isTranslationRequest && canShowToast {
213- canShowToast = false
212+ if isTranslationRequest {
213+ delegate ? . updateTranslateURLBar ( tab : tab , state : . active )
214214
215- Task { @ MainActor in
216- self . delegate ? . updateTranslateURLBar ( tab : tab , state : . active )
217- self . delegate? . presentToast ( tab: tab, languageInfo: currentLanguageInfo)
215+ if canShowToast {
216+ canShowToast = false
217+ delegate? . presentToast ( tab: tab, languageInfo: currentLanguageInfo)
218218 }
219219 }
220220
Original file line number Diff line number Diff line change @@ -74,10 +74,11 @@ extension BrowserViewController: BraveTranslateScriptHandlerDelegate {
7474 completion ( false )
7575 }
7676 ) ,
77- autoLayoutConfiguration: . init ( preferredWidth : self . view . bounds . width - ( 32.0 * 2.0 ) )
77+ autoLayoutConfiguration: . phoneWidth
7878 )
7979
8080 popover. arrowDistance = 10.0
81+ popover. outerMargins = UIEdgeInsets ( equalInset: 16.0 )
8182
8283 popover. previewForOrigin = . init(
8384 view: self . topToolbar. locationView. translateButton. then {
You can’t perform that action at this time.
0 commit comments