refactor: turn DC_MSG_ID_* into MsgId::* associated constants

This commit is contained in:
link2xt
2026-08-22 20:21:20 +00:00
committed by l
parent fe25e93d6c
commit 6c47e86380
6 changed files with 18 additions and 29 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
use crate::chat::ChatItem;
use crate::constants::DC_MSG_ID_DAYMARKER;
use crate::contact::ContactId;
use crate::location::Location;
use crate::message::MsgId;
@@ -21,7 +20,7 @@ impl dc_array_t {
Self::ContactIds(array) => array[index].to_u32(),
Self::Chat(array) => match array[index] {
ChatItem::Message { msg_id } => msg_id.to_u32(),
ChatItem::DayMarker { .. } => DC_MSG_ID_DAYMARKER,
ChatItem::DayMarker { .. } => MsgId::DAYMARKER.to_u32(),
},
Self::Locations(array) => array[index].location_id,
Self::Uint(array) => array[index],