mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 23:36:30 +03:00
api!: Contact::get_color(): Preserve address-based color hue for SELF
4010c60e7b "feat: use key fingerprints for color generation" changes
colors for contacts including SELF. Even if an avatar is set, the self-color is visible in
e.g. replies to outgoing messages.
This adds `Config::Selfcolor` and sets it in a migration. This doesn't preserve the old
address-based color accurately because the old code generating colors is already dropped, so this
only preserves the color angle (hue).
This commit is contained in:
@@ -4311,7 +4311,8 @@ pub unsafe extern "C" fn dc_contact_get_color(contact: *mut dc_contact_t) -> u32
|
||||
return 0;
|
||||
}
|
||||
let ffi_contact = &*contact;
|
||||
ffi_contact.contact.get_color()
|
||||
let ctx = &*ffi_contact.context;
|
||||
block_on(ffi_contact.contact.get_color(ctx)).unwrap_or_log_default(ctx, "Failed get_color")
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
Reference in New Issue
Block a user