changes to make scheduled messages activity ui compliant with the rest of the app message listing activities. now allows sending and deleting multiple scheduled messages at once

This commit is contained in:
gavine99
2025-02-19 18:51:36 +11:00
parent 302dadd077
commit d7c5b1b71e
13 changed files with 430 additions and 241 deletions
@@ -131,27 +131,4 @@ class ConversationsAdapter @Inject constructor(
return if (getItem(position)?.unread == false) 0 else 1
}
fun toggleSelectAll() {
var needToSelectAll = false
// if a non-selected item is found, then we need to select all, otherwise deselect all
for (position in 0 until itemCount)
if (!isSelected(getItemId(position))) {
needToSelectAll = true
break
}
// select or deselect item based on if toggling all selected of deselected
for (position in 0 until itemCount) {
val threadId = getItemId(position)
// if deselecting all then toggle selection (we know all items are selected)
if (!needToSelectAll)
toggleSelection(threadId)
// else, selecting all, toggle if not already selected
else if (!isSelected(threadId))
toggleSelection(threadId)
}
notifyDataSetChanged()
}
}