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>) {
|
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();
|
||||||
|
|
Loading…
Reference in New Issue