Add configurable iPhone widgets
This commit is contained in:
@@ -4,13 +4,17 @@ pub fn home_page(server_name: String, home: HomeData) -> HomePage {
|
||||
let (heat_cells, contribution_count) = heat_cells(&home.heatmap);
|
||||
HomePage {
|
||||
server_name,
|
||||
activities: home.activities.iter().map(activity_row).collect(),
|
||||
activities: activity_rows(&home.activities),
|
||||
heat_cells,
|
||||
contribution_count,
|
||||
next_page: home.next_page.map(|page| page as u32),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn activity_rows(activities: &[models::Activity]) -> Vec<ActivityRow> {
|
||||
activities.iter().map(activity_row).collect()
|
||||
}
|
||||
|
||||
fn activity_row(activity: &models::Activity) -> ActivityRow {
|
||||
use models::activity::OpType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user