Skip to content

Commit e2bce09

Browse files
committed
fix(v1.8.0): IMPL_06 Resolve ClickableText deprecation warning
- Replace deprecated ClickableText with modern Text + LinkAnnotation API - Update imports: remove ClickableText, add LinkAnnotation & withLink - Use TextLinkStyles for styled clickable links in changelog - Maintain URL click functionality without deprecated API - Update CHANGELOG.md with missing IMPL_04 & IMPL_06 feature details - Update CHANGELOG.de.md with matching German translations - Add Backup Settings Progress improvements to changelog - Add Post-Update Changelog Dialog documentation - Verify all 23 v1.8.0 features documented in changelog Resolves deprecation warning in Kotlin/Compose build. ClickableText is deprecated in favor of Text with LinkAnnotation for link handling. Migration maintains full functionality while using modern Compose APIs. Changelogs updated to include all major features from feature branch: IMPL_04 Backup Progress UI improvements and IMPL_06 Post-Update Changelog, marking v1.8.0 feature-complete with comprehensive documentation. Build: BUILD SUCCESSFUL - 0 Lint errors + 0 Deprecation warnings
1 parent 661d9e0 commit e2bce09

3 files changed

Lines changed: 47 additions & 19 deletions

File tree

CHANGELOG.de.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,23 @@ Komplettes Widget-System mit interaktiven Checklisten, Notiz-Sortierung und umfa
9393
- Sync-Einstellungen umstrukturiert in klare Sektionen: Auslöser & Performance ([eaac5a0](https://github.com/inventory69/simple-notes-sync/commit/eaac5a0))
9494
- Changelog-Link zum About-Screen hinzugefügt ([49810ff](https://github.com/inventory69/simple-notes-sync/commit/49810ff))
9595

96+
**Post-Update Changelog-Dialog** ([661d9e0](https://github.com/inventory69/simple-notes-sync/commit/661d9e0))
97+
- Zeigt lokalisierten Changelog beim ersten Start nach Update
98+
- Material 3 ModalBottomSheet mit Slide-up-Animation
99+
- Lädt F-Droid Changelogs via Assets (Single Source of Truth)
100+
- Einmalige Anzeige pro versionCode (gespeichert in SharedPreferences)
101+
- Klickbarer GitHub-Link für vollständigen Changelog
102+
- Durch Button oder Swipe-Geste schließbar
103+
- Test-Modus in Debug-Einstellungen mit Reset-Option
104+
105+
**Backup-Einstellungs-Verbesserungen** ([3e946ed](https://github.com/inventory69/simple-notes-sync/commit/3e946ed))
106+
- Neue BackupProgressCard mit LinearProgressIndicator
107+
- 3-Phasen-Status-System: In Progress → Abschluss → Löschen
108+
- Erfolgs-Status für 2s angezeigt, Fehler für 3s
109+
- Redundante Toast-Nachrichten entfernt
110+
- Buttons bleiben sichtbar und deaktiviert während Operationen
111+
- Exception-Logging für besseres Error-Tracking
112+
96113
### 🐛 Fehlerbehebungen
97114

98115
**Widget-Text-Anzeige** ([d045d4d](https://github.com/inventory69/simple-notes-sync/commit/d045d4d))

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,23 @@ Complete widget system with interactive checklists, note sorting, and major sync
9393
- Sync settings restructured into clear sections: Triggers & Performance ([eaac5a0](https://github.com/inventory69/simple-notes-sync/commit/eaac5a0))
9494
- Changelog link added to About screen ([49810ff](https://github.com/inventory69/simple-notes-sync/commit/49810ff))
9595

96+
**Post-Update Changelog Dialog** ([661d9e0](https://github.com/inventory69/simple-notes-sync/commit/661d9e0))
97+
- Shows localized changelog on first launch after update
98+
- Material 3 ModalBottomSheet with slide-up animation
99+
- Loads F-Droid changelogs via assets (single source of truth)
100+
- One-time display per versionCode (stored in SharedPreferences)
101+
- Clickable GitHub link for full changelog
102+
- Dismissable via button or swipe gesture
103+
- Test mode in Debug Settings with reset option
104+
105+
**Backup Settings Improvements** ([3e946ed](https://github.com/inventory69/simple-notes-sync/commit/3e946ed))
106+
- New BackupProgressCard with LinearProgressIndicator
107+
- 3-phase status system: In Progress → Completion → Clear
108+
- Success status shown for 2s, errors for 3s
109+
- Removed redundant toast messages
110+
- Buttons stay visible and disabled during operations
111+
- Exception logging for better error tracking
112+
96113
### 🐛 Bug Fixes
97114

98115
**Widget Text Display** ([d045d4d](https://github.com/inventory69/simple-notes-sync/commit/d045d4d))

android/app/src/main/java/dev/dettmer/simplenotes/ui/main/UpdateChangelogSheet.kt

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
1010
import androidx.compose.foundation.layout.height
1111
import androidx.compose.foundation.layout.navigationBarsPadding
1212
import androidx.compose.foundation.layout.padding
13-
import androidx.compose.foundation.text.ClickableText
1413
import androidx.compose.material3.Button
1514
import androidx.compose.material3.ExperimentalMaterial3Api
1615
import androidx.compose.material3.MaterialTheme
@@ -27,10 +26,12 @@ import androidx.compose.ui.Alignment
2726
import androidx.compose.ui.Modifier
2827
import androidx.compose.ui.platform.LocalContext
2928
import androidx.compose.ui.res.stringResource
29+
import androidx.compose.ui.text.LinkAnnotation
3030
import androidx.compose.ui.text.SpanStyle
3131
import androidx.compose.ui.text.buildAnnotatedString
3232
import androidx.compose.ui.text.font.FontWeight
3333
import androidx.compose.ui.text.style.TextDecoration
34+
import androidx.compose.ui.text.withLink
3435
import androidx.compose.ui.text.withStyle
3536
import androidx.compose.ui.unit.dp
3637
import dev.dettmer.simplenotes.BuildConfig
@@ -107,39 +108,32 @@ fun UpdateChangelogSheet() {
107108
lines.forEachIndexed { index, line ->
108109
if (line.startsWith("http://") || line.startsWith("https://")) {
109110
// Make URLs clickable
110-
pushStringAnnotation(
111-
tag = "URL",
112-
annotation = line.trim()
113-
)
114-
withStyle(
115-
style = SpanStyle(
116-
color = MaterialTheme.colorScheme.primary,
117-
textDecoration = TextDecoration.Underline
111+
withLink(
112+
LinkAnnotation.Url(
113+
url = line.trim(),
114+
styles = androidx.compose.ui.text.TextLinkStyles(
115+
style = SpanStyle(
116+
color = MaterialTheme.colorScheme.primary,
117+
textDecoration = TextDecoration.Underline
118+
)
119+
)
118120
)
119121
) {
120122
append(line)
121123
}
122-
pop()
123124
} else {
124125
append(line)
125126
}
126127
if (index < lines.size - 1) append("\n")
127128
}
128129
}
129130

130-
ClickableText(
131+
Text(
131132
text = annotatedText,
132133
style = MaterialTheme.typography.bodyMedium.copy(
133134
color = MaterialTheme.colorScheme.onSurfaceVariant
134135
),
135-
modifier = Modifier.fillMaxWidth(),
136-
onClick = { offset ->
137-
annotatedText.getStringAnnotations(tag = "URL", start = offset, end = offset)
138-
.firstOrNull()?.let { annotation ->
139-
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(annotation.item))
140-
context.startActivity(intent)
141-
}
142-
}
136+
modifier = Modifier.fillMaxWidth()
143137
)
144138

145139
Spacer(modifier = Modifier.height(24.dp))

0 commit comments

Comments
 (0)