Fix showing saved posts
This commit is contained in:
parent
3d403d01f7
commit
1f044145b3
|
@ -175,9 +175,14 @@ impl SimpleComponent for ProfilePage {
|
|||
fn update(&mut self, message: Self::Input, sender: ComponentSender<Self>) {
|
||||
match message {
|
||||
ProfileInput::UpdatePerson(person, clear) => {
|
||||
let state = if self.saved_only {
|
||||
crate::AppState::Saved
|
||||
} else {
|
||||
crate::AppState::Person
|
||||
};
|
||||
sender
|
||||
.output_sender()
|
||||
.emit(crate::AppMsg::UpdateState(crate::AppState::Person));
|
||||
.emit(crate::AppMsg::UpdateState(state));
|
||||
|
||||
if clear {
|
||||
self.info = person.clone();
|
||||
|
|
Loading…
Reference in New Issue