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

login: smoother wifi dialog (fixes #5387) #5394

Merged
merged 5 commits into from
Mar 7, 2025

Conversation

huitk
Copy link
Member

@huitk huitk commented Feb 28, 2025

fixes #5387

To test:
On DialogUtils.kt

  • Comment out if statement line 77 and 100
  • delete private on line 76

On LoginActivity.kt

  • line 51 add DialogUtils.showDialog(this)
Screenshot 2025-02-28 at 2 14 49 PM

@huitk huitk linked an issue Feb 28, 2025 that may be closed by this pull request
Copy link
Collaborator

@Okuro3499 Okuro3499 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is also some double space between Bluetooth/Wifi and is on

Comment on lines 91 to 98
d.getButton(AlertDialog.BUTTON_POSITIVE)?.apply {
textSize = 14f
setPadding(20,20,20,20)
}
d.getButton(AlertDialog.BUTTON_NEGATIVE)?.apply {
textSize = 14f
setPadding(20,20,20,20)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val pd = AlertDialog.Builder(context, R.style.CustomAlertDialog) if you update this line to val pd = AlertDialog.Builder(context, R.style.AlertDialogTheme) where you change the dialog theme you won't need this line

var message = ""
if (NetworkUtils.isBluetoothEnabled()) message += "Bluetooth/"
if (NetworkUtils.isWifiEnabled()) message += "WiFi/"
message = message.trim().removeSuffix("/")
Copy link
Collaborator

@Okuro3499 Okuro3499 Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huitk this works but why are we adding the / then removing it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remove only the last "/" because if only Wifi is on, it will show WIfi/ instead if wifi. Or if both wifi and Bluetooth are on, it will show Bluetooth/Wifi/.

Copy link
Collaborator

@Okuro3499 Okuro3499 Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huitk can it be and since we are sure both bluetooth and wifi are on

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Okuro3499 Okuro3499 requested a review from Avinash-Codes March 7, 2025 18:03
@dogi dogi changed the title login: spelling error and button sizes (fixes #5387) login: smoother wifi dialog (fixes #5387) Mar 7, 2025
@dogi dogi merged commit 9095726 into master Mar 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

login: multiple spelling errors
6 participants