Immediate feedback on follow/unfollow button

This commit is contained in:
Mike Dilger 2023-01-01 14:54:20 +13:00
parent 14a54a5536
commit 0297cdf4ae

View File

@ -203,10 +203,12 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, _frame: &mut eframe::Fra
if person.followed == 0 { if person.followed == 0 {
if ui.button("FOLLOW").clicked() { if ui.button("FOLLOW").clicked() {
GLOBALS.people.blocking_write().follow(&pubkeyhex, true); GLOBALS.people.blocking_write().follow(&pubkeyhex, true);
app.person_view_person.as_mut().unwrap().followed = 1;
} }
} else { } else {
if ui.button("UNFOLLOW").clicked() { if ui.button("UNFOLLOW").clicked() {
GLOBALS.people.blocking_write().follow(&pubkeyhex, false); GLOBALS.people.blocking_write().follow(&pubkeyhex, false);
app.person_view_person.as_mut().unwrap().followed = 0;
} }
} }
} }