Skip to content

Commit

Permalink
fix: default https format url and 223 file name length fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Jun 17, 2024
1 parent eeb7acb commit 6a3d7d9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class CreateShortcutDialogFragment : DialogFragment() {
private fun formatUrl(url: String): String {
var formattedUrl = url
if (!url.startsWith("http://") && !url.startsWith("https://")) {
formattedUrl = "http://$url"
formattedUrl = "https://$url"
}
return formattedUrl
}
Expand All @@ -71,7 +71,7 @@ class CreateShortcutDialogFragment : DialogFragment() {
binding.createShortcutDialogNameFileValue.doOnTextChanged { fileNameValue, _, _, _ ->
fileNameValue?.let {
hasForbiddenCharacters = forbiddenChars.any { fileNameValue.contains(it) }
hasMaxCharacters = fileNameValue.length >= MAX_FILENAME_LENGTH
hasMaxCharacters = fileNameValue.length > MAX_FILENAME_LENGTH
isValidFileName = fileNameValue.isNotBlank() && !hasForbiddenCharacters && !hasMaxCharacters
handleNameRequirements(hasForbiddenCharacters, hasMaxCharacters)
updateCreateShortcutButtonState(isValidFileName, isValidUrl)
Expand Down

0 comments on commit 6a3d7d9

Please sign in to comment.