web: change exit catchup behavior to view current message
This commit is contained in:
parent
1452746305
commit
9346c46e62
@ -586,7 +586,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
model.versions.server = Some(version);
|
model.versions.server = Some(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
Msg::StartCatchup => {
|
Msg::CatchupStart => {
|
||||||
let query = if model.query.contains("is:unread") {
|
let query = if model.query.contains("is:unread") {
|
||||||
model.query.to_string()
|
model.query.to_string()
|
||||||
} else {
|
} else {
|
||||||
@ -625,6 +625,9 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Msg::CatchupExit => {
|
||||||
|
model.catchup = None;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -778,8 +781,9 @@ pub enum Msg {
|
|||||||
SetProgress(f64),
|
SetProgress(f64),
|
||||||
UpdateServerVersion(String),
|
UpdateServerVersion(String),
|
||||||
|
|
||||||
StartCatchup,
|
CatchupStart,
|
||||||
CatchupKeepUnread,
|
CatchupKeepUnread,
|
||||||
CatchupMarkAsRead,
|
CatchupMarkAsRead,
|
||||||
CatchupNext,
|
CatchupNext,
|
||||||
|
CatchupExit,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -193,7 +193,7 @@ fn catchup_view(
|
|||||||
div![
|
div![
|
||||||
C!["absolute", "right-4", "text-gray-500"],
|
C!["absolute", "right-4", "text-gray-500"],
|
||||||
span![i![C!["fas", "fa-x"]]],
|
span![i![C!["fas", "fa-x"]]],
|
||||||
ev(Ev::Click, move |_| Msg::GoToSearchResults)
|
ev(Ev::Click, move |_| Msg::CatchupExit)
|
||||||
],
|
],
|
||||||
h1![
|
h1![
|
||||||
C!["text-center"],
|
C!["text-center"],
|
||||||
@ -449,7 +449,7 @@ fn search_toolbar(
|
|||||||
attrs! {At::Title => "Mark as read"},
|
attrs! {At::Title => "Mark as read"},
|
||||||
span![i![C!["far", "fa-eye"]]],
|
span![i![C!["far", "fa-eye"]]],
|
||||||
span![C!["pl-2", "hidden", "md:inline"], "Catch-up"],
|
span![C!["pl-2", "hidden", "md:inline"], "Catch-up"],
|
||||||
ev(Ev::Click, |_| Msg::StartCatchup)
|
ev(Ev::Click, |_| Msg::CatchupStart)
|
||||||
]],
|
]],
|
||||||
],
|
],
|
||||||
div![
|
div![
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user