refactor(purchases): drop the blind-mode disclaimer modal

Purchases is now exercised against an account with real purchases, so
the one-time "built in blind mode" notice no longer describes the
feature. Remove the modal, its controller state, the bridge invokable,
the persisted pref and the three strings from the seven catalogs that
carried them.

cc
This commit is contained in:
vicrodh committed 2026-09-01 23:40:33 -06:00
1 parent 1cb988954e
commit 3c8ab80be5
10 files changed
+7 -177

No files matched your search

@@ -6282,15 +6282,6 @@ msgstr "{} von {}"
msgid "Last playlist" msgid "Last playlist"
msgstr "Letzte Playlist" msgstr "Letzte Playlist"
msgid "About music purchases"
msgstr "Über Musikkäufe"
msgid "Music purchases are not available in every country or region where the platform offers streaming. One of those countries, where nothing can be bought and only the streaming subscription is offered, is Mexico."
msgstr "Musikkäufe sind nicht in jedem Land oder jeder Region verfügbar, in der die Plattform Streaming anbietet. Eines dieser Länder, in dem nichts gekauft werden kann und nur das Streaming-Abo angeboten wird, ist Mexiko."
msgid "As it happens, the developer and maintainer of this software is from Mexico, so this section was built in blind mode — 'I am one with the Force and the Force is with me' — with some feedback from a couple of contributors, but in the end, in blind mode: it ships with no guarantee that it works and no promise to fix whatever is broken."
msgstr "Zufällig stammt der Entwickler und Maintainer dieser Software aus Mexiko, daher wurde dieser Bereich im Blindflug entwickelt — 'I am one with the Force and the Force is with me' — mit etwas Feedback von ein paar Contributors, aber am Ende doch im Blindflug: Er wird ohne Funktionsgarantie und ohne Versprechen ausgeliefert, Fehler zu beheben."
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@@ -6288,15 +6288,6 @@ msgstr "{} de {}"
msgid "Last playlist" msgid "Last playlist"
msgstr "Última playlist" msgstr "Última playlist"
msgid "About music purchases"
msgstr "Acerca de la compra de música"
msgid "Music purchases are not available in every country or region where the platform offers streaming. One of those countries, where nothing can be bought and only the streaming subscription is offered, is Mexico."
msgstr "La opción de compra de música no está disponible en todos los países/regiones donde la plataforma está para streaming. Uno de esos países donde no puede comprarse nada y sólo se permite la suscripción para streaming es México."
msgid "As it happens, the developer and maintainer of this software is from Mexico, so this section was built in blind mode — 'I am one with the Force and the Force is with me' — with some feedback from a couple of contributors, but in the end, in blind mode: it ships with no guarantee that it works and no promise to fix whatever is broken."
msgstr "Dicho sea de paso, el desarrollador y mantenedor de este software es de México, así que esta sección fue desarrollada en modo ciego — 'I am one with the Force and the Force is with me' — con algo de feedback de un par de contributors, pero al final en modo ciego: se entrega sin garantía de funcionamiento y sin promesa de reparar lo que esté mal."
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@@ -6280,15 +6280,6 @@ msgstr "{} sur {}"
msgid "Last playlist" msgid "Last playlist"
msgstr "Dernière playlist" msgstr "Dernière playlist"
msgid "About music purchases"
msgstr "À propos des achats de musique"
msgid "Music purchases are not available in every country or region where the platform offers streaming. One of those countries, where nothing can be bought and only the streaming subscription is offered, is Mexico."
msgstr "L'achat de musique n'est pas disponible dans tous les pays ou régions où la plateforme propose le streaming. L'un de ces pays, où rien ne peut être acheté et où seul l'abonnement streaming est proposé, est le Mexique."
msgid "As it happens, the developer and maintainer of this software is from Mexico, so this section was built in blind mode — 'I am one with the Force and the Force is with me' — with some feedback from a couple of contributors, but in the end, in blind mode: it ships with no guarantee that it works and no promise to fix whatever is broken."
msgstr "Il se trouve que le développeur et mainteneur de ce logiciel est mexicain ; cette section a donc été développée en aveugle — 'I am one with the Force and the Force is with me' — avec quelques retours de deux ou trois contributeurs, mais au final en aveugle : elle est livrée sans garantie de fonctionnement et sans promesse de réparer ce qui ne marche pas."
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@@ -6264,15 +6264,6 @@ msgstr "{} / {}"
msgid "Last playlist" msgid "Last playlist"
msgstr "前回のプレイリスト" msgstr "前回のプレイリスト"
msgid "About music purchases"
msgstr "音楽購入について"
msgid "Music purchases are not available in every country or region where the platform offers streaming. One of those countries, where nothing can be bought and only the streaming subscription is offered, is Mexico."
msgstr "音楽の購入は、プラットフォームがストリーミングを提供しているすべての国や地域で利用できるわけではありません。何も購入できず、ストリーミングのサブスクリプションのみが提供されている国のひとつがメキシコです。"
msgid "As it happens, the developer and maintainer of this software is from Mexico, so this section was built in blind mode — 'I am one with the Force and the Force is with me' — with some feedback from a couple of contributors, but in the end, in blind mode: it ships with no guarantee that it works and no promise to fix whatever is broken."
msgstr "実はこのソフトウェアの開発者・メンテナーはメキシコ出身です。そのためこのセクションは手探りで開発されました — 'I am one with the Force and the Force is with me' — 数人のコントリビューターからのフィードバックはありましたが、最終的には手探りのまま。動作の保証はなく、不具合を修正する約束もなしで提供されます。"
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@@ -6270,15 +6270,6 @@ msgstr "{} van {}"
msgid "Last playlist" msgid "Last playlist"
msgstr "Laatste playlist" msgstr "Laatste playlist"
msgid "About music purchases"
msgstr "Over muziekaankopen"
msgid "Music purchases are not available in every country or region where the platform offers streaming. One of those countries, where nothing can be bought and only the streaming subscription is offered, is Mexico."
msgstr "Muziekaankopen zijn niet beschikbaar in elk land of elke regio waar het platform streaming aanbiedt. Een van die landen, waar niets gekocht kan worden en alleen het streamingabonnement wordt aangeboden, is Mexico."
msgid "As it happens, the developer and maintainer of this software is from Mexico, so this section was built in blind mode — 'I am one with the Force and the Force is with me' — with some feedback from a couple of contributors, but in the end, in blind mode: it ships with no guarantee that it works and no promise to fix whatever is broken."
msgstr "Toevallig komt de ontwikkelaar en beheerder van deze software uit Mexico, dus deze sectie is blind ontwikkeld — 'I am one with the Force and the Force is with me' — met wat feedback van een paar contributors, maar uiteindelijk blind: hij wordt geleverd zonder garantie dat hij werkt en zonder belofte om te repareren wat kapot is."
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@@ -6280,15 +6280,6 @@ msgstr "{} de {}"
msgid "Last playlist" msgid "Last playlist"
msgstr "Última playlist" msgstr "Última playlist"
msgid "About music purchases"
msgstr "Sobre a compra de músicas"
msgid "Music purchases are not available in every country or region where the platform offers streaming. One of those countries, where nothing can be bought and only the streaming subscription is offered, is Mexico."
msgstr "A compra de músicas não está disponível em todos os países ou regiões onde a plataforma oferece streaming. Um desses países, onde nada pode ser comprado e apenas a assinatura de streaming é oferecida, é o México."
msgid "As it happens, the developer and maintainer of this software is from Mexico, so this section was built in blind mode — 'I am one with the Force and the Force is with me' — with some feedback from a couple of contributors, but in the end, in blind mode: it ships with no guarantee that it works and no promise to fix whatever is broken."
msgstr "Acontece que o desenvolvedor e mantenedor deste software é do México, então esta seção foi desenvolvida às cegas — 'I am one with the Force and the Force is with me' — com algum feedback de alguns contribuidores, mas no fim às cegas: é entregue sem garantia de funcionamento e sem promessa de consertar o que estiver errado."
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@@ -6300,15 +6300,6 @@ msgstr "{} из {}"
msgid "Last playlist" msgid "Last playlist"
msgstr "Последний плейлист" msgstr "Последний плейлист"
msgid "About music purchases"
msgstr "О покупке музыки"
msgid "Music purchases are not available in every country or region where the platform offers streaming. One of those countries, where nothing can be bought and only the streaming subscription is offered, is Mexico."
msgstr "Покупка музыки доступна не во всех странах и регионах, где платформа предлагает стриминг. Одна из таких стран, где ничего нельзя купить и доступна только подписка на стриминг, — Мексика."
msgid "As it happens, the developer and maintainer of this software is from Mexico, so this section was built in blind mode — 'I am one with the Force and the Force is with me' — with some feedback from a couple of contributors, but in the end, in blind mode: it ships with no guarantee that it works and no promise to fix whatever is broken."
msgstr "Так уж вышло, что разработчик и мейнтейнер этой программы из Мексики, поэтому этот раздел разрабатывался вслепую — 'I am one with the Force and the Force is with me' — с некоторой обратной связью от пары контрибьюторов, но в итоге всё же вслепую: он поставляется без гарантии работоспособности и без обещания чинить то, что сломано."
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
-84
View File
@@ -557,88 +557,4 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
target: flick target: flick
} }
// ── One-time disclaimer modal (QoL round) ────────────────────────────
// The WindowsDisclaimerModal mechanism on the purchases pref seam:
// seeded from `purchases_disclaimer_seen` on entry, OK persists it and
// it never returns. Overlay shape + wheel-lock are the
// DiscoverConfigModal pattern (plain Item, not a Popup — each surface
// eats its own wheel; ADR-009 z ≥ 3000). The scrim does NOT dismiss:
// like the Windows disclaimer, the only way out is the button, so a
// stray click cannot silently acknowledge it forever.
Item {
visible: root.doc.disclaimerVisible === true
enabled: visible
anchors.fill: parent
z: 3100
Rectangle {
anchors.fill: parent
radius: theme.radiusMd
color: "#bf000000"
MouseArea {
anchors.fill: parent
onClicked: {}
onWheel: function (wheel) { wheel.accepted = true }
}
}
Rectangle {
width: Math.min(parent.width - 80, 520)
height: Math.min(discCol.implicitHeight + 48, parent.height - 80)
x: Math.round((parent.width - width) / 2)
y: Math.round((parent.height - height) / 2)
radius: theme.radiusMd
color: theme.surfaceCard
border.width: 1
border.color: theme.borderSubtle
clip: true
MouseArea {
anchors.fill: parent
onWheel: function (wheel) { wheel.accepted = true }
}
Column {
id: discCol
x: 24
y: 24
width: parent.width - 48
spacing: 14
Text {
width: parent.width
text: QbzSession.tr("About music purchases", QbzSession.trRev)
color: theme.textPrimary
font.pixelSize: 17
font.weight: Font.DemiBold
wrapMode: Text.WordWrap
}
Text {
width: parent.width
text: QbzSession.tr("Music purchases are not available in every country or region where the platform offers streaming. One of those countries, where nothing can be bought and only the streaming subscription is offered, is Mexico.", QbzSession.trRev)
color: theme.textSecondary
font.pixelSize: 13
wrapMode: Text.WordWrap
}
Text {
width: parent.width
text: QbzSession.tr("As it happens, the developer and maintainer of this software is from Mexico, so this section was built in blind mode — 'I am one with the Force and the Force is with me' — with some feedback from a couple of contributors, but in the end, in blind mode: it ships with no guarantee that it works and no promise to fix whatever is broken.", QbzSession.trRev)
color: theme.textSecondary
font.pixelSize: 13
wrapMode: Text.WordWrap
}
Item {
width: parent.width
height: 32
QbzPrimaryButton {
anchors.right: parent.right
label: QbzSession.tr("OK", QbzSession.trRev)
btnHeight: 32
onClicked: QbzPurchases.dismissDisclaimer()
}
}
}
}
}
} }
-9
View File
@@ -129,11 +129,6 @@ pub mod qbz_purchases_bridge {
#[qinvokable] #[qinvokable]
fn dismiss_region_notice(self: Pin<&mut QbzPurchases>); fn dismiss_region_notice(self: Pin<&mut QbzPurchases>);
/// OK on the one-time disclaimer modal. Persisted
/// (`purchases_disclaimer_seen`).
#[qinvokable]
fn dismiss_disclaimer(self: Pin<&mut QbzPurchases>);
/// Open the purchased-album detail. RECORDS the album and starts the /// Open the purchased-album detail. RECORDS the album and starts the
/// fetch; the QML caller then calls `QbzShell.navigateTo("purchase-album")` /// fetch; the QML caller then calls `QbzShell.navigateTo("purchase-album")`
/// — in THAT order (§C.2). /// — in THAT order (§C.2).
@@ -279,10 +274,6 @@ impl qbz_purchases_bridge::QbzPurchases {
crate::purchases_qt::dismiss_region_notice(); crate::purchases_qt::dismiss_region_notice();
} }
pub fn dismiss_disclaimer(self: Pin<&mut Self>) {
crate::purchases_qt::dismiss_disclaimer();
}
pub fn open_album(self: Pin<&mut Self>, album_id: QString) { pub fn open_album(self: Pin<&mut Self>, album_id: QString) {
crate::purchases_qt::open_album(album_id.to_string()); crate::purchases_qt::open_album(album_id.to_string());
} }
+7 -21
View File
@@ -84,9 +84,6 @@ const PREF_HIDE_UNAVAILABLE: &str = "purchases_hide_unavailable";
const PREF_HIDE_DOWNLOADED: &str = "purchases_hide_downloaded"; const PREF_HIDE_DOWNLOADED: &str = "purchases_hide_downloaded";
const PREF_QUALITY_FILTER: &str = "purchases_quality_filter"; const PREF_QUALITY_FILTER: &str = "purchases_quality_filter";
const PREF_REGION_NOTICE_SEEN: &str = "purchases_region_notice_seen"; const PREF_REGION_NOTICE_SEEN: &str = "purchases_region_notice_seen";
/// The one-time blind-mode disclaimer modal (QoL round) — same mechanism as
/// the region notice: seeded from the pref on entry, dismissed once, forever.
const PREF_DISCLAIMER_SEEN: &str = "purchases_disclaimer_seen";
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Documents (contract §G.2 / §G.3 — FROZEN; two QML lanes are written against // Documents (contract §G.2 / §G.3 — FROZEN; two QML lanes are written against
@@ -190,18 +187,18 @@ struct ListDoc {
/// `""` = none; non-empty renders the retry block. /// `""` = none; non-empty renders the retry block.
error: String, error: String,
tab: String, tab: String,
/// From the TWO `getUserPurchasesIds(limit=1, offset=0, type)` calls (§2.4), /// From TWO `getUserPurchases(type, limit=1)` calls — one per type — never
/// never from the list response — `get_user_purchases_all_typed` zeroes the /// from `getUserPurchasesIds`: that endpoint's `tracks.total` counts every
/// other type's total, and the live capture showed the sibling key is in /// purchased track INCLUDING the ones that came inside an album (34 on an
/// fact absent entirely (§2.5b-2). /// account with three albums and no standalone track, 2026-09-01), while
/// the Tracks tab lists standalone track purchases only. Never from the
/// active tab's own page either: a typed page simply omits the sibling
/// type's key (§2.5b-2), so the other counter needs its own call.
counts: Counts, counts: Counts,
search: String, search: String,
searching: bool, searching: bool,
#[serde(rename = "regionNoticeVisible")] #[serde(rename = "regionNoticeVisible")]
region_notice_visible: bool, region_notice_visible: bool,
/// ADDITIVE (QoL round): the one-time disclaimer modal.
#[serde(rename = "disclaimerVisible")]
disclaimer_visible: bool,
/// The Tracks tab shows ONLY group + the two filters (§5). /// The Tracks tab shows ONLY group + the two filters (§5).
toolbar: ToolbarDoc, toolbar: ToolbarDoc,
albums: Vec<AlbumRow>, albums: Vec<AlbumRow>,
@@ -720,7 +717,6 @@ struct ListState {
search: String, search: String,
searching: bool, searching: bool,
region_notice_visible: bool, region_notice_visible: bool,
disclaimer_visible: bool,
group: String, group: String,
sort: String, sort: String,
ascending: bool, ascending: bool,
@@ -757,7 +753,6 @@ impl Default for ListState {
region_notice_visible: true, region_notice_visible: true,
// FALSE until the entry seed reads the pref: the modal must never // FALSE until the entry seed reads the pref: the modal must never
// flash for a user who already dismissed it. // flash for a user who already dismissed it.
disclaimer_visible: false,
group: "off".to_string(), group: "off".to_string(),
// §G.2's spelling of the reference's `'date'` sort key. // §G.2's spelling of the reference's `'date'` sort key.
sort: "purchased".to_string(), sort: "purchased".to_string(),
@@ -929,7 +924,6 @@ fn build_list_doc(s: &ListState) -> ListDoc {
search: s.search.clone(), search: s.search.clone(),
searching: s.searching, searching: s.searching,
region_notice_visible: s.region_notice_visible, region_notice_visible: s.region_notice_visible,
disclaimer_visible: s.disclaimer_visible,
toolbar: ToolbarDoc { toolbar: ToolbarDoc {
group: s.group.clone(), group: s.group.clone(),
sort: s.sort.clone(), sort: s.sort.clone(),
@@ -1384,7 +1378,6 @@ pub fn open_list() {
s.hide_downloaded = crate::settings_qt::pref_bool(PREF_HIDE_DOWNLOADED, false); s.hide_downloaded = crate::settings_qt::pref_bool(PREF_HIDE_DOWNLOADED, false);
s.quality_filter = crate::settings_qt::pref_str(PREF_QUALITY_FILTER, "all"); s.quality_filter = crate::settings_qt::pref_str(PREF_QUALITY_FILTER, "all");
s.region_notice_visible = !crate::settings_qt::pref_bool(PREF_REGION_NOTICE_SEEN, false); s.region_notice_visible = !crate::settings_qt::pref_bool(PREF_REGION_NOTICE_SEEN, false);
s.disclaimer_visible = !crate::settings_qt::pref_bool(PREF_DISCLAIMER_SEEN, false);
s.error.clear(); s.error.clear();
// THE GUARD (§5). `false -> true` is claimed here, under the lock, so // THE GUARD (§5). `false -> true` is claimed here, under the lock, so
// two entries in the same frame cannot both fire the metadata load. // two entries in the same frame cannot both fire the metadata load.
@@ -1716,13 +1709,6 @@ pub fn dismiss_region_notice() {
publish_list(); publish_list();
} }
/// OK on the one-time disclaimer modal: persist and never show it again.
pub fn dismiss_disclaimer() {
crate::settings_qt::save_pref(PREF_DISCLAIMER_SEEN, serde_json::json!(true));
with_list(|s| s.disclaimer_visible = false);
publish_list();
}
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Detail // Detail
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------