fix: normalize recent Patreon support

This commit is contained in:
Hakan Seven committed 2026-08-04 12:17:21 +03:00
1 parent 1955e022bf
commit 63c8245f98
4 files changed
+235 -69

No files matched your search

+3 -3
View File
@@ -277,8 +277,8 @@ pub(super) struct OpenCADStudio {
/// mid-edit; applied on Enter). Kept in sync when the +/- buttons change it.
recent_limit_input: String,
command_line: CommandLine,
/// Paying Patreon supporters shown on the Start page (name, pledge cents),
/// fetched once at boot, highest pledge first.
/// Recent Patreon supporters shown on the Start page (name, USD cents),
/// fetched once at boot, highest payment first.
patrons: Vec<(String, i64)>,
/// Tutorial-playlist videos for the Start page: seeded from the on-disk
/// cache at boot, refreshed by a live playlist fetch.
@@ -2287,7 +2287,7 @@ pub enum Message {
PluginRegistryErrorDetailsToggle,
/// Copy registry URL, platform, version, and raw error details.
PluginRegistryCopyDiagnostics,
/// Patreon supporters fetched at boot for the Start page (name, pledge cents).
/// Patreon supporters fetched at boot for the Start page (name, USD cents).
PatronsFetched(Result<Vec<(String, i64)>, String>),
/// Tutorial-playlist videos fetched at boot for the Start page.
VideosFetched(Result<Vec<crate::videos::VideoEntry>, String>),
+2 -2
View File
@@ -2744,8 +2744,8 @@ fn start_page_content<'a>(
})
.width(Fill);
for (name, cents) in patrons {
// Cents → the campaign currency's main unit. Symbol assumed "$";
// adjust if the campaign bills in another currency.
// Patreon payments are normalized to USD cents while the list is
// generated; hand-maintained entries use USD cents as well.
let amount = format!("${:.2}", *cents as f64 / 100.0);
list = list.push(
iced::widget::row![