Skip to content

Commit badf748

Browse files
committed
fix footer message
1 parent 023a87f commit badf748

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

src/app/tile/elm.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,9 @@ pub fn view(tile: &Tile, wid: window::Id) -> Element<'_, Message> {
189189
.height(height as u32);
190190

191191
let text = if tile.query_lc.is_empty() {
192-
if tile.config.auto_suggest && tile.page == Page::Main {
193-
"Frequently used".to_string()
194-
} else {
195-
tile.page.to_string()
192+
match &tile.page {
193+
Page::Main => tile.config.main_page.to_string(),
194+
page => page.to_string(),
196195
}
197196
} else {
198197
match results_count {

src/config.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ pub enum MainPage {
6666
Blank,
6767
}
6868

69+
impl std::fmt::Display for MainPage {
70+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
71+
f.write_str(match self {
72+
MainPage::Blank => "♥️ Rustcast",
73+
MainPage::Favourites => "Favourites",
74+
MainPage::FrequentlyUsed => "Frequently Used",
75+
})
76+
}
77+
}
78+
6979
/// The settings you can set for the theme
7080
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
7181
#[serde(default)]

0 commit comments

Comments
 (0)