-
Notifications
You must be signed in to change notification settings - Fork 473
Conversation
// https://github.com/mozilla-mobile/android-components/issues/5249 | ||
const val MAX_URI_LENGTH = 25000 | ||
|
||
fun getTrimmedUrl(url: String): String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if this should be moved to one of our more generic support components since this is being used more widely outside this browser-toolbar component. One idea is support-ktx https://searchfox.org/mozilla-mobile/source/android-components/components/support/ktx/src/main/java/mozilla/components/support/ktx/kotlin/String.kt
We also want to make this an actual extension of Strings
fun getTrimmedUrl(url: String): String { | |
fun String.toTrimmedUrl(): String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please add a kDoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was kinda looking for this. Thank you!
Seems like ktlint complains about all existing problems in the touched files.
Building on Windows with the git config `core.autocrlf=true` (sorry) results in a line ending of `\r\n` in `version.txt`, so just removing `\n` leaves trailing whitespace in the resulting Java code that ends in a build failure.
…/android-components into performance_bug_1790913
@@ -9,7 +9,7 @@ object Gecko { | |||
/** | |||
* GeckoView Version. | |||
*/ | |||
const val version = "107.0.20221011093208" | |||
const val version = "107.0.20221012094509" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Looks like it was committed by mistake :)
@@ -51,11 +51,19 @@ class AppLinksUseCases( | |||
private val launchInApp: () -> Boolean = { false }, | |||
private val alwaysDeniedSchemes: Set<String> = ALWAYS_DENY_SCHEMES | |||
) { | |||
@Suppress("QueryPermissionsNeeded") // We expect our browsers to have the QUERY_ALL_PACKAGES permission | |||
@Suppress( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Looks like unrelated changes
<!-- Title of the time picker dialog. --> | ||
<string name="mozac_feature_prompts_set_time">Set time</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accountManager.unregisterForSyncEvents(eventObserver) | ||
accountManager.unregister(accountObserver) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
/** | ||
* Returns truncated urls and search terms to improve performance. | ||
*/ | ||
fun String.toTrimmedUrl(): String { | ||
return this.take(MAX_URI_LENGTH) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽
I think we will need to rebase as there are some unrelated changes that have been leaked to the PR :) |
Pull Request checklist
After merge
GitHub Automation
Fixes #12804
Fixes #12930