feat: show number picker when creating new chats or adding members (#532)
* feat: show number picker when adding members to group Refs: https://github.com/FossifyOrg/Messages/issues/456 * feat: always show number picker when creating new chats Refs: https://github.com/FossifyOrg/Messages/issues/153 * docs: update changelog * docs: update changelog * docs: update changelog * feat: never show add person as an action button * feat: never show add person as an action button * docs: update changelog
This commit is contained in:
parent
2280c4581e
commit
b5d865b8c0
5 changed files with 23 additions and 35 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
|
@ -5,11 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- Reordered action buttons throughout the app
|
||||
|
||||
### Added
|
||||
- Ability to save multiple attachments ([#75])
|
||||
- Ability to select numbers that aren't starred when starting a new conversation ([#153])
|
||||
|
||||
### Changed
|
||||
- Reordered menu options throughout the app
|
||||
|
||||
### Fixed
|
||||
- Fixed contact number selection when adding members to a group ([#456])
|
||||
- Fixed a glitch in pattern lock after incorrect attempts
|
||||
|
||||
## [1.3.0] - 2025-09-09
|
||||
### Added
|
||||
|
|
@ -135,6 +140,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
[#75]: https://github.com/FossifyOrg/Messages/issues/75
|
||||
[#115]: https://github.com/FossifyOrg/Messages/issues/115
|
||||
[#135]: https://github.com/FossifyOrg/Messages/issues/135
|
||||
[#153]: https://github.com/FossifyOrg/Messages/issues/153
|
||||
[#180]: https://github.com/FossifyOrg/Messages/issues/180
|
||||
[#209]: https://github.com/FossifyOrg/Messages/issues/209
|
||||
[#217]: https://github.com/FossifyOrg/Messages/issues/217
|
||||
|
|
@ -150,6 +156,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
[#334]: https://github.com/FossifyOrg/Messages/issues/334
|
||||
[#349]: https://github.com/FossifyOrg/Messages/issues/349
|
||||
[#359]: https://github.com/FossifyOrg/Messages/issues/359
|
||||
[#456]: https://github.com/FossifyOrg/Messages/issues/456
|
||||
[#461]: https://github.com/FossifyOrg/Messages/issues/461
|
||||
|
||||
[Unreleased]: https://github.com/FossifyOrg/Messages/compare/1.3.0...HEAD
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import android.view.WindowManager
|
|||
import android.widget.Toast
|
||||
import com.google.gson.Gson
|
||||
import com.reddit.indicatorfastscroll.FastScrollItemIndicator
|
||||
import org.fossify.commons.dialogs.RadioGroupDialog
|
||||
import org.fossify.commons.extensions.applyColorFilter
|
||||
import org.fossify.commons.extensions.areSystemAnimationsEnabled
|
||||
import org.fossify.commons.extensions.beGone
|
||||
|
|
@ -16,11 +15,11 @@ import org.fossify.commons.extensions.beVisibleIf
|
|||
import org.fossify.commons.extensions.getColorStateList
|
||||
import org.fossify.commons.extensions.getContrastColor
|
||||
import org.fossify.commons.extensions.getMyContactsCursor
|
||||
import org.fossify.commons.extensions.getPhoneNumberTypeText
|
||||
import org.fossify.commons.extensions.getProperPrimaryColor
|
||||
import org.fossify.commons.extensions.getProperTextColor
|
||||
import org.fossify.commons.extensions.hasPermission
|
||||
import org.fossify.commons.extensions.hideKeyboard
|
||||
import org.fossify.commons.extensions.maybeShowNumberPickerDialog
|
||||
import org.fossify.commons.extensions.normalizeString
|
||||
import org.fossify.commons.extensions.onTextChangeListener
|
||||
import org.fossify.commons.extensions.toast
|
||||
|
|
@ -33,7 +32,6 @@ import org.fossify.commons.helpers.NavigationIcon
|
|||
import org.fossify.commons.helpers.PERMISSION_READ_CONTACTS
|
||||
import org.fossify.commons.helpers.SimpleContactsHelper
|
||||
import org.fossify.commons.helpers.ensureBackgroundThread
|
||||
import org.fossify.commons.models.RadioItem
|
||||
import org.fossify.commons.models.SimpleContact
|
||||
import org.fossify.messages.R
|
||||
import org.fossify.messages.adapters.ContactsAdapter
|
||||
|
|
@ -200,30 +198,8 @@ class NewConversationActivity : SimpleActivity() {
|
|||
ContactsAdapter(this, contacts, binding.contactsList) {
|
||||
hideKeyboard()
|
||||
val contact = it as SimpleContact
|
||||
val phoneNumbers = contact.phoneNumbers
|
||||
if (phoneNumbers.size > 1) {
|
||||
val primaryNumber = contact.phoneNumbers.find { it.isPrimary }
|
||||
if (primaryNumber != null) {
|
||||
launchThreadActivity(primaryNumber.value, contact.name)
|
||||
} else {
|
||||
val items = ArrayList<RadioItem>()
|
||||
phoneNumbers.forEachIndexed { index, phoneNumber ->
|
||||
val type = getPhoneNumberTypeText(phoneNumber.type, phoneNumber.label)
|
||||
items.add(
|
||||
RadioItem(
|
||||
index,
|
||||
"${phoneNumber.normalizedNumber} ($type)",
|
||||
phoneNumber.normalizedNumber
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
RadioGroupDialog(this, items) {
|
||||
launchThreadActivity(it as String, contact.name)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
launchThreadActivity(phoneNumbers.first().normalizedNumber, contact.name)
|
||||
maybeShowNumberPickerDialog(contact.phoneNumbers) { number ->
|
||||
launchThreadActivity(number.normalizedNumber, contact.name)
|
||||
}
|
||||
}.apply {
|
||||
binding.contactsList.adapter = this
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ import org.fossify.commons.extensions.isDynamicTheme
|
|||
import org.fossify.commons.extensions.isOrWasThankYouInstalled
|
||||
import org.fossify.commons.extensions.isVisible
|
||||
import org.fossify.commons.extensions.launchActivityIntent
|
||||
import org.fossify.commons.extensions.maybeShowNumberPickerDialog
|
||||
import org.fossify.commons.extensions.normalizeString
|
||||
import org.fossify.commons.extensions.notificationManager
|
||||
import org.fossify.commons.extensions.onTextChangeListener
|
||||
|
|
@ -623,7 +624,12 @@ class ThreadActivity : SimpleActivity() {
|
|||
val currContacts =
|
||||
(binding.addContactOrNumber.adapter as AutoCompleteTextViewAdapter).resultList
|
||||
val selectedContact = currContacts[position]
|
||||
addSelectedContact(selectedContact)
|
||||
maybeShowNumberPickerDialog(selectedContact.phoneNumbers) { phoneNumber ->
|
||||
val contactWithSelectedNumber = selectedContact.copy(
|
||||
phoneNumbers = arrayListOf(phoneNumber)
|
||||
)
|
||||
addSelectedContact(contactWithSelectedNumber)
|
||||
}
|
||||
}
|
||||
|
||||
binding.addContactOrNumber.onTextChangeListener {
|
||||
|
|
|
|||
|
|
@ -23,10 +23,9 @@
|
|||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/manage_people"
|
||||
android:icon="@drawable/ic_add_person_vector"
|
||||
android:showAsAction="ifRoom"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/add_person"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/add_number_to_contact"
|
||||
android:title="@string/add_number_to_contact"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ eventbus = "3.3.1"
|
|||
#Room
|
||||
room = "2.8.0"
|
||||
#Fossify
|
||||
commons = "5.0.2"
|
||||
commons = "5.2.0"
|
||||
android-smsmms = "c3e678befd"
|
||||
indicator-fast-scroll = "4524cd0b61"
|
||||
#Gradle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue