update const name

This commit is contained in:
yggverse 2024-11-20 16:51:56 +02:00
parent 564b02c0f5
commit 69b879540d

View File

@ -5,8 +5,8 @@ glib::wrapper! {
pub struct Item(ObjectSubclass<imp::Item>);
}
// C-based conversion for `None` value
const PROFILE_IDENTITY_GEMINI_ID_NONE: i64 = -1;
// C-type conversion
const OPTION_NEW: i64 = -1;
impl Item {
// Constructors
@ -18,7 +18,7 @@ impl Item {
"profile_identity_gemini_id",
match profile_identity_gemini_id {
Some(value) => value,
None => PROFILE_IDENTITY_GEMINI_ID_NONE,
None => OPTION_NEW,
},
)
.property("title", title)
@ -31,7 +31,7 @@ impl Item {
/// Additional `profile_identity_gemini_id` wrapper with `Option` value support
pub fn profile_identity_gemini_id_option(&self) -> Option<i64> {
match self.profile_identity_gemini_id() {
PROFILE_IDENTITY_GEMINI_ID_NONE => None,
OPTION_NEW => None,
value => Some(value),
}
}