-
Notifications
You must be signed in to change notification settings - Fork 171
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
Dashpay 11.0.3 fixes #1323
Conversation
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() | ||
} |
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.
This is to avoid an ANR
// remove request | ||
usernameRequestDao.remove(request.requestId) | ||
// remove related votes | ||
usernameVoteDao.remove(request.normalizedLabel) | ||
} | ||
// remove related votes | ||
usernameVoteDao.remove(request.normalizedLabel) |
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.
Before our records of username votes were getting removed even though voting wasn't finished.
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.
Looks good
fun broadcastUpdateProfile( | ||
displayName: String, | ||
publicMessage: String, | ||
avatarUrl: String, | ||
uploadService: String = "", | ||
localAvatarUrl: 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.
This file has only style changes
binding.requestUsernameButton.isEnabled = username.isNotEmpty() && | ||
requestUserNameViewModel.canAffordNonContestedUsername() | ||
|
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.
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.
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.
Looks good
Issue being fixed or feature implemented
Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist: