Commit fd02ce9
committed
refactor(details): Improve version comparison and download logging
This commit introduces a more robust semantic version comparison algorithm and corrects the download size logging for cancelled downloads.
The version comparison logic now properly handles pre-release identifiers (e.g., `-alpha`, `-beta`), ensuring that stable releases are correctly prioritized over pre-releases. Additionally, when a download is cancelled, the log now correctly records the total expected size of the asset rather than the partially downloaded bytes.
- **refactor(versioning)**: Updated `compareSemanticVersions` to correctly handle pre-release suffixes.
- **fix(logging)**: Corrected `appendLog` to use the asset's total size instead of downloaded bytes when a download is cancelled.
- **chore(proguard)**: Removed redundant `-keep` rules for AndroidX Compose and Navigation, as these are now bundled with the respective libraries.1 parent b9b5335 commit fd02ce9
2 files changed
Lines changed: 13 additions & 7 deletions
File tree
- composeApp
- feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | 126 | | |
128 | | - | |
129 | | - | |
130 | 127 | | |
131 | 128 | | |
132 | 129 | | |
| |||
182 | 179 | | |
183 | 180 | | |
184 | 181 | | |
185 | | - | |
| 182 | + | |
186 | 183 | | |
187 | 184 | | |
188 | 185 | | |
| |||
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
371 | 372 | | |
372 | 373 | | |
373 | | - | |
374 | 374 | | |
| 375 | + | |
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
| |||
1052 | 1053 | | |
1053 | 1054 | | |
1054 | 1055 | | |
1055 | | - | |
1056 | | - | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
1057 | 1061 | | |
1058 | 1062 | | |
1059 | 1063 | | |
1060 | 1064 | | |
1061 | 1065 | | |
1062 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1063 | 1072 | | |
1064 | 1073 | | |
1065 | 1074 | | |
| |||
0 commit comments