mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 11:43:43 +00:00
Immediate feedback on follow/unfollow button
This commit is contained in:
parent
14a54a5536
commit
0297cdf4ae
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user