Skip to content

Commit a4ec8b2

Browse files
committed
Supports icons dependent on theme
1 parent 9197c0b commit a4ec8b2

File tree

6 files changed

+1192
-118
lines changed

6 files changed

+1192
-118
lines changed

components/suggest/src/rs.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,10 @@ pub(crate) struct DownloadedYelpSuggestion {
395395
pub location_signs: Vec<DownloadedYelpLocationSign>,
396396
#[serde(rename = "yelpModifiers")]
397397
pub yelp_modifiers: Vec<String>,
398-
#[serde(rename = "icon")]
399-
pub icon_id: String,
398+
#[serde(rename = "iconLightTheme")]
399+
pub icon_light_theme_id: String,
400+
#[serde(rename = "iconDarkTheme")]
401+
pub icon_dark_theme_id: String,
400402
pub score: f64,
401403
}
402404

components/suggest/src/schema.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@ CREATE TABLE yelp_location_signs(
113113
) WITHOUT ROWID;
114114
115115
CREATE TABLE yelp_custom_details(
116-
icon_id TEXT PRIMARY KEY,
116+
icon_light_theme_id TEXT NOT NULL,
117+
icon_dark_theme_id TEXT NOT NULL,
117118
score REAL NOT NULL,
118-
record_id TEXT NOT NULL
119+
record_id TEXT NOT NULL,
120+
PRIMARY KEY (icon_light_theme_id, icon_dark_theme_id)
119121
) WITHOUT ROWID;
120122
121123
CREATE TABLE mdn_custom_details(

0 commit comments

Comments
 (0)