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 {
209
209
// Cache CSS and JS requests
210
210
Self . requestCache [ request. url] = ( data, response)
211
211
212
- if isTranslationRequest && canShowToast {
213
- canShowToast = false
212
+ if isTranslationRequest {
213
+ delegate ? . updateTranslateURLBar ( tab : tab , state : . active )
214
214
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)
218
218
}
219
219
}
220
220
Original file line number Diff line number Diff line change @@ -74,10 +74,11 @@ extension BrowserViewController: BraveTranslateScriptHandlerDelegate {
74
74
completion ( false )
75
75
}
76
76
) ,
77
- autoLayoutConfiguration: . init ( preferredWidth : self . view . bounds . width - ( 32.0 * 2.0 ) )
77
+ autoLayoutConfiguration: . phoneWidth
78
78
)
79
79
80
80
popover. arrowDistance = 10.0
81
+ popover. outerMargins = UIEdgeInsets ( equalInset: 16.0 )
81
82
82
83
popover. previewForOrigin = . init(
83
84
view: self . topToolbar. locationView. translateButton. then {
You can’t perform that action at this time.
0 commit comments