Skip to content

Commit

Permalink
Rename published at -> publish time.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmackdev committed Oct 24, 2023
1 parent 24ab233 commit ada48b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pubsubman/src/column_settings.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#[derive(Clone, serde::Deserialize, serde::Serialize)]
pub struct ColumnSettings {
pub show_published_at: bool,
pub show_publish_time: bool,
}

impl Default for ColumnSettings {
fn default() -> Self {
Self {
show_published_at: true,
show_publish_time: true,
}
}
}
Expand All @@ -16,7 +16,7 @@ impl ColumnSettings {
ui.visuals_mut().widgets.inactive.weak_bg_fill = egui::Color32::from_gray(32);
ui.menu_button("Columns ⏷", |ui| {
ui.horizontal(|ui| {
ui.checkbox(&mut self.show_published_at, " Published at");
ui.checkbox(&mut self.show_publish_time, " Publish Time");
});
});
}
Expand Down
6 changes: 4 additions & 2 deletions pubsubman/src/ui/messages_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ fn render_messages_table<'a, I>(
) where
I: Iterator<Item = &'a PubsubMessage>,
{
let ColumnSettings { show_published_at } = *column_settings;
let ColumnSettings {
show_publish_time: show_published_at,
} = *column_settings;

let mut num_columns = 2; // ID and Data columns will always be shown.

Expand All @@ -228,7 +230,7 @@ fn render_messages_table<'a, I>(
ui.label("ID");

if show_published_at {
ui.label("Published at");
ui.label("Publish Time");
}

// Let Data column take up all remaining space.
Expand Down

0 comments on commit ada48b5

Please sign in to comment.