feat: implementata la doppia numerazione uniforme nel Player e il caricamento silente dei canti personalizzati
This commit is contained in:
@@ -14,10 +14,13 @@
|
|||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title class="outfit-font wrapped-title">
|
<ion-title class="outfit-font wrapped-title">
|
||||||
<div class="title-main" [style.fontSize.rem]="fontSize() * 1.1">
|
<div class="title-main" [style.fontSize.rem]="fontSize() * 1.1">
|
||||||
<span class="canto-number" *ngIf="canto()?.id_canti" [style.color]="getCommunitySongNumber(canto()) !== null ? 'var(--ion-color-secondary)' : ''">
|
<span class="canto-number" *ngIf="canto()?.id_canti">
|
||||||
{{ getCommunitySongNumber(canto()) || canto()?.id_canti }}
|
{{ canto()?.id?.startsWith('my_') ? 'M' : canto()?.id_canti }}
|
||||||
|
</span>
|
||||||
|
<span class="title-text" style="display: inline-flex; align-items: center; flex-wrap: wrap;">
|
||||||
|
<span *ngIf="getCommunitySongNumber(canto())" style="color: var(--ion-color-secondary); font-weight: 600; margin-right: 8px; opacity: 0.9;">{{ getCommunitySongNumber(canto()) }}</span>
|
||||||
|
<span>{{ canto()?.titolo || 'Player' }}</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="title-text">{{ canto()?.titolo || 'Player' }}</span>
|
|
||||||
<span *ngIf="canto()?.nonValidato" class="non-validato-badge">Non Validato</span>
|
<span *ngIf="canto()?.nonValidato" class="non-validato-badge">Non Validato</span>
|
||||||
</div>
|
</div>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|||||||
@@ -57,7 +57,17 @@ export class SettingsPage {
|
|||||||
console.error('Failed to refresh liturgical readings:', err);
|
console.error('Failed to refresh liturgical readings:', err);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. Check for Service Worker updates
|
// 3. Refresh community data if a code is active
|
||||||
|
const comunitaCode = this.comunitaService.comunitaCode();
|
||||||
|
if (comunitaCode) {
|
||||||
|
try {
|
||||||
|
await this.comunitaService.setComunitaCode(comunitaCode);
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Failed to refresh community data:', err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Check for Service Worker updates
|
||||||
if (this.swUpdate.isEnabled) {
|
if (this.swUpdate.isEnabled) {
|
||||||
try {
|
try {
|
||||||
const updateFound = await this.swUpdate.checkForUpdate();
|
const updateFound = await this.swUpdate.checkForUpdate();
|
||||||
|
|||||||
@@ -57,7 +57,15 @@ export class ComunitaService {
|
|||||||
const savedCantiPersonali = localStorage.getItem('comunita-canti-personali');
|
const savedCantiPersonali = localStorage.getItem('comunita-canti-personali');
|
||||||
const savedFilterActive = localStorage.getItem('comunita-filter-active') === 'true';
|
const savedFilterActive = localStorage.getItem('comunita-filter-active') === 'true';
|
||||||
|
|
||||||
if (savedCode) this.comunitaCode.set(savedCode);
|
if (savedCode) {
|
||||||
|
this.comunitaCode.set(savedCode);
|
||||||
|
// Run background refresh 1 second after startup to fetch any new custom canti or updates
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setComunitaCode(savedCode).catch(err => {
|
||||||
|
console.warn('Failed background community refresh at startup:', err);
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
if (savedNome) this.comunitaNome.set(savedNome);
|
if (savedNome) this.comunitaNome.set(savedNome);
|
||||||
if (savedMail) this.comunitaMail.set(savedMail);
|
if (savedMail) this.comunitaMail.set(savedMail);
|
||||||
if (savedCanti) {
|
if (savedCanti) {
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
export const VERSION = '2026.05.20.1211';
|
export const VERSION = '2026.05.20.1221';
|
||||||
|
|||||||
Reference in New Issue
Block a user