fix(ui): notes éditables et rail masqué en tri date

EBO <eric.bouhana@softalys.com> committé le 2026-07-22 15:57

ad00d5b2e9af73de4d81ec19167710366924b965

1 parent(s)

2 fichiers modifiés +16 -11
M android/app/src/main/java/fr/ebii/card2vcf/ui/carnet/CarnetScreen.kt
+15 -11
@@ -68,7 +68,7 @@ fun CarnetScreen(
68 68 val scope = rememberCoroutineScope()
69 69 var sortMenuOpen by remember { mutableStateOf(false) }
70 70 var fabMenuOpen by remember { mutableStateOf(false) }
71 - val showRail = query.isBlank()
71 + val showRail = query.isBlank() && sort != ContactSort.CREATED_AT
72 72 val presentLetters = remember(sections) { sections.map { it.first }.toSet() }
73 73 val isEmpty = sections.isEmpty() || sections.all { it.second.isEmpty() }
74 74
@@ -192,6 +192,7 @@ fun CarnetScreen(
192 192 ContactList(
193 193 sections = sections,
194 194 listState = listState,
195 + showSectionHeaders = sort != ContactSort.CREATED_AT,
195 196 onOpenContact = { id -> onOpenContact(id, sort) },
196 197 modifier = Modifier.weight(1f),
197 198 )
@@ -218,22 +219,25 @@ private fun ContactList(
218 219 listState: LazyListState,
219 220 onOpenContact: (Long) -> Unit,
220 221 modifier: Modifier = Modifier,
222 + showSectionHeaders: Boolean = true,
221 223 ) {
222 224 LazyColumn(
223 225 state = listState,
224 226 modifier = modifier.fillMaxSize(),
225 227 ) {
226 228 sections.forEach { (letter, contacts) ->
227 - item(key = "header-$letter") {
228 - Text(
229 - text = letter.toString(),
230 - style = MaterialTheme.typography.labelMedium,
231 - color = TexteFaible,
232 - modifier = Modifier
233 - .fillMaxWidth()
234 - .background(Fond)
235 - .padding(vertical = 6.dp),
236 - )
229 + if (showSectionHeaders) {
230 + item(key = "header-$letter") {
231 + Text(
232 + text = letter.toString(),
233 + style = MaterialTheme.typography.labelMedium,
234 + color = TexteFaible,
235 + modifier = Modifier
236 + .fillMaxWidth()
237 + .background(Fond)
238 + .padding(vertical = 6.dp),
239 + )
240 + }
237 241 }
238 242 items(contacts, key = { it.id }) { contact ->
239 243 ContactRow(
M android/app/src/main/java/fr/ebii/card2vcf/ui/contact/ContactEditViewModel.kt
+1 -0
@@ -58,6 +58,7 @@ class ContactEditViewModel(
58 58 card = _card.value,
59 59 cardBitmap = null,
60 60 profileBitmap = pendingProfile,
61 + preserveNotesIfBlankDraft = false,
61 62 )
62 63 _saveDone.value = true
63 64 }