Fix showing saved posts

This commit is contained in:
Bnyro 2023-07-13 16:34:27 +02:00
parent 3d403d01f7
commit 1f044145b3
1 changed files with 6 additions and 1 deletions

View File

@ -175,9 +175,14 @@ impl SimpleComponent for ProfilePage {
fn update(&mut self, message: Self::Input, sender: ComponentSender<Self>) { fn update(&mut self, message: Self::Input, sender: ComponentSender<Self>) {
match message { match message {
ProfileInput::UpdatePerson(person, clear) => { ProfileInput::UpdatePerson(person, clear) => {
let state = if self.saved_only {
crate::AppState::Saved
} else {
crate::AppState::Person
};
sender sender
.output_sender() .output_sender()
.emit(crate::AppMsg::UpdateState(crate::AppState::Person)); .emit(crate::AppMsg::UpdateState(state));
if clear { if clear {
self.info = person.clone(); self.info = person.clone();