fix weird crash with missing timeline
My timeline wen't missing and then I started crashing here.. bizarre
This commit is contained in:
@@ -66,10 +66,11 @@ impl Route {
|
|||||||
match self {
|
match self {
|
||||||
Route::Timeline(tlr) => match tlr {
|
Route::Timeline(tlr) => match tlr {
|
||||||
TimelineRoute::Timeline(id) => {
|
TimelineRoute::Timeline(id) => {
|
||||||
let timeline = columns
|
if let Some(timeline) = columns.find_timeline(*id) {
|
||||||
.find_timeline(*id)
|
|
||||||
.expect("expected to find timeline");
|
|
||||||
timeline.kind.to_title()
|
timeline.kind.to_title()
|
||||||
|
} else {
|
||||||
|
ColumnTitle::simple("Unknown")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
TimelineRoute::Thread(_id) => ColumnTitle::simple("Thread"),
|
TimelineRoute::Thread(_id) => ColumnTitle::simple("Thread"),
|
||||||
TimelineRoute::Reply(_id) => ColumnTitle::simple("Reply"),
|
TimelineRoute::Reply(_id) => ColumnTitle::simple("Reply"),
|
||||||
|
|||||||
Reference in New Issue
Block a user