mirror of
https://github.com/FossifyOrg/Messages.git
synced 2025-12-24 00:00:16 -05:00
feat: allow adding alphanumeric senders to contacts (#653)
Refs: https://github.com/FossifyOrg/Messages/issues/232
This commit is contained in:
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Added
|
### Added
|
||||||
- Added "Copy number to clipboard" option inside chat overflow menu ([#651])
|
- Added "Copy number to clipboard" option inside chat overflow menu ([#651])
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Made "Add number to contact" option visible for alphanumeric senders ([#232])
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixed missing notifications in some cases ([#159])
|
- Fixed missing notifications in some cases ([#159])
|
||||||
- Fixed incorrect blocking of MMS messages in some rare cases ([#644])
|
- Fixed incorrect blocking of MMS messages in some rare cases ([#644])
|
||||||
|
|||||||
@@ -370,12 +370,9 @@ class ThreadActivity : SimpleActivity() {
|
|||||||
findItem(R.id.manage_people).isVisible = !isSpecialNumber() && !isRecycleBin
|
findItem(R.id.manage_people).isVisible = !isSpecialNumber() && !isRecycleBin
|
||||||
findItem(R.id.mark_as_unread).isVisible = threadItems.isNotEmpty() && !isRecycleBin
|
findItem(R.id.mark_as_unread).isVisible = threadItems.isNotEmpty() && !isRecycleBin
|
||||||
|
|
||||||
// allow saving number in cases when we don't have it stored yet and it is a casual readable number
|
// allow saving number in cases when we don't have it stored yet
|
||||||
findItem(R.id.add_number_to_contact).isVisible =
|
findItem(R.id.add_number_to_contact).isVisible =
|
||||||
participants.size == 1
|
participants.size == 1 && participants.first().name == firstPhoneNumber && !isRecycleBin
|
||||||
&& participants.first().name == firstPhoneNumber
|
|
||||||
&& firstPhoneNumber.any { it.isDigit() }
|
|
||||||
&& !isRecycleBin
|
|
||||||
findItem(R.id.copy_number).isVisible =
|
findItem(R.id.copy_number).isVisible =
|
||||||
participants.size == 1 && !firstPhoneNumber.isNullOrEmpty() && !isRecycleBin
|
participants.size == 1 && !firstPhoneNumber.isNullOrEmpty() && !isRecycleBin
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user