From 73dc39c6ee0827fc68b93af8dc438b0e1c14e929 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Wed, 14 Aug 2024 16:59:11 +0200 Subject: treewide: replace uint32 uids with opaque strings Add a new models.UID type (an alias to string). Replace all occurrences of uint32 being used as message UID or thread UID with models.UID. Update all workers to only expose models.UID values and deal with the conversion internally. Only IMAP needs to convert these to uint32. All other backends already use plain strings as message identifiers, in which case no conversion is even needed. The directory tree implementation needed to be heavily refactored in order to accommodate thread UID not being usable as a list index. Signed-off-by: Robin Jarry Tested-by: Inwit Tested-by: Tim Culverhouse --- commands/msg/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands/msg/utils.go') diff --git a/commands/msg/utils.go b/commands/msg/utils.go index d6dffd50..f6acb10d 100644 --- a/commands/msg/utils.go +++ b/commands/msg/utils.go @@ -29,7 +29,7 @@ func newHelper() *helper { } } -func (h *helper) markedOrSelectedUids() ([]uint32, error) { +func (h *helper) markedOrSelectedUids() ([]models.UID, error) { return commands.MarkedOrSelected(h.msgProvider) } -- cgit