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

Dashpay 11.0.3 fixes #1323

Merged
merged 11 commits into from
Nov 14, 2024
Merged

Dashpay 11.0.3 fixes #1323

merged 11 commits into from
Nov 14, 2024

Conversation

HashEngineering
Copy link
Collaborator

@HashEngineering HashEngineering commented Nov 11, 2024

Issue being fixed or feature implemented

Related PR's and Dependencies

Screenshots / Videos

How Has This Been Tested?

  • QA (Mobile Team)

Checklist:

  • I have performed a self-review of my own code and added comments where necessary
  • I have added or updated relevant unit/integration/functional/e2e tests

@HashEngineering HashEngineering self-assigned this Nov 12, 2024
Comment on lines -170 to +181
val storageManager = applicationContext.getSystemService<StorageManager>()!!
val storageUUID = storageManager.getUuidForPath(filesDir)
val availableBytes = storageManager.getAllocatableBytes(storageUUID)
val toleranceInBytes = 1024L * 1024 * STORAGE_TOLERANCE
lifecycleScope.launch {
val storageManager = applicationContext.getSystemService<StorageManager>()!!
val availableBytes = withContext(Dispatchers.IO) {
val storageUUID = storageManager.getUuidForPath(filesDir)
storageManager.getAllocatableBytes(storageUUID)
}
val toleranceInBytes = 1024L * 1024 * STORAGE_TOLERANCE

if (availableBytes <= toleranceInBytes && !lowStorageDialogShown) {
lowStorageDialogShown = true
showLowStorageAlertDialog()
if (availableBytes <= toleranceInBytes && !lowStorageDialogShown) {
lowStorageDialogShown = true
showLowStorageAlertDialog()
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is to avoid an ANR

Comment on lines +1145 to -1148
// remove request
usernameRequestDao.remove(request.requestId)
// remove related votes
usernameVoteDao.remove(request.normalizedLabel)
}
// remove related votes
usernameVoteDao.remove(request.normalizedLabel)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Before our records of username votes were getting removed even though voting wasn't finished.

Copy link
Member

@Syn-McJ Syn-McJ left a comment

Choose a reason for hiding this comment

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

Looks good

Comment on lines +128 to +134
fun broadcastUpdateProfile(
displayName: String,
publicMessage: String,
avatarUrl: String,
uploadService: String = "",
localAvatarUrl: String = ""
) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file has only style changes

Comment on lines -52 to -54
binding.requestUsernameButton.isEnabled = username.isNotEmpty() &&
requestUserNameViewModel.canAffordNonContestedUsername()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was removed because it is handled in the uiState observer. This code would allow the user to click "Request Username" before the validation of the name was completed.

Copy link
Member

@Syn-McJ Syn-McJ left a comment

Choose a reason for hiding this comment

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

Looks good

@HashEngineering HashEngineering merged commit da9f0eb into dashpay-voting Nov 14, 2024
2 checks passed
@HashEngineering HashEngineering deleted the dashpay-11.0.3-fixes branch December 5, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants