Skip to content

Commit

Permalink
feat: simpler JSON in emulator UI (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavadeli authored Dec 13, 2024
1 parent 72a6908 commit f769975
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions crates/emulator-database/src/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,7 @@ impl Listener {

// Only send if newer than the resume_token
let send_initial = match &send_if_newer_than {
Some(previous_time) => !doc
.as_ref()
.is_some_and(|v| (&v.update_time) <= (previous_time)),
Some(previous_time) => doc.as_ref().is_none_or(|v| &v.update_time > previous_time),
_ => true,
};

Expand Down
4 changes: 3 additions & 1 deletion crates/googleapis/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ fn main() {
"#[derive(serde::Serialize)]",
)
.message_attribute(".google.firestore.v1.Value", "#[derive(serde::Serialize)]")
.message_attribute(".google.firestore.v1.Value", "#[serde(transparent)]")
.enum_attribute(".google.firestore.v1.Value", "#[derive(serde::Serialize)]")
.enum_attribute(".google.firestore.v1.Value", "#[serde(untagged)]")
.message_attribute(
".google.firestore.v1.ArrayValue",
"#[derive(serde::Serialize)]",
Expand All @@ -21,7 +24,6 @@ fn main() {
".google.firestore.v1.MapValue",
"#[derive(serde::Serialize)]",
)
.enum_attribute(".google.firestore.v1.Value", "#[derive(serde::Serialize)]")
.compile(
&["include/google/firestore/v1/firestore.proto"],
&["include"],
Expand Down

0 comments on commit f769975

Please sign in to comment.