8000 Load sender avatars from GNOME Contacts by Toxblh · Pull Request #8 · hyprlab/hylki · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dirs = "5"
md5 = "0.7"
ureq = { version = "2", features = ["json"] }
serde_json = "1"
base64 = "0.22"

# GNOME Contacts integration via Evolution Data Server (D-Bus)
zbus = "4"
Expand Down
12 changes: 12 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ pub enum AppMsg {
RemoveBlacklist(String),
MarkSpam,
SetGravatar(bool),
ContactPhotosChanged,
SetThreading(bool),
SetThreadsExpanded(bool),
SetFetchInterval(u64),
Expand Down Expand Up @@ -826,6 +827,12 @@ impl SimpleComponent for AppModel {
gallery_by_account: HashMap::new(),
};
model.spawn_workers(&sender);
crate::contacts::watch_photo_changes({
let input = sender.input_sender().clone();
move || {
let _ = input.send(AppMsg::ContactPhotosChanged);
}
});
// Watch GNOME Online Accounts so an account removed there disappears from
// Vireo live (no restart needed); reconciliation happens on GoaChanged.
crate::goa::watch_removals({
Expand Down Expand Up @@ -1610,6 +1617,11 @@ impl SimpleComponent for AppModel {
}
}

AppMsg::ContactPhotosChanged => {
self.message_list.emit(MessageListInput::ContactPhotosChanged);
self.message_view.emit(MessageViewInput::ContactPhotosChanged);
}

AppMsg::SetFetchInterval(secs) => {
if self.fetch_interval_secs != secs {
self.fetch_interval_secs = secs;
Expand Down
Loading
0