Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added a progress indicator to indicate call history retrieval
- Added bottom padding in lists to allow scrolling above the floating action button

## [Unreleased] - 2025-10-15
### Fixed
- Fixed custom sorting in favorites not taking effect until app restart


### Changed
- The hang-up button is now always visible in the call UI ([#9])
- Enhanced the size of caller avatar and buttons in the call UI ([#118])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,19 @@ class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPa
val orderIds = items.map { it.contactId }
val orderGsonString = Gson().toJson(orderIds)
config.favoritesContactsOrder = orderGsonString
assignCustomOrderToAllContact(orderIds)
}
}

private fun assignCustomOrderToAllContact(orderIds: List<Int>){
val customOrderContact = allContacts
.sortedBy { contact ->
orderIds.indexOf(contact.contactId).takeIf { it != -1 } ?: Int.MAX_VALUE
}
allContacts.clear()
allContacts.addAll(customOrderContact)
}

private fun setupLetterFastScroller(contacts: List<Contact>) {
binding.letterFastscroller.setupWithContacts(binding.fragmentList, contacts)
}
Expand Down
Loading