Commit f774d14
committed
fix(details): improve coroutine management and cleanup profile UI
This commit addresses potential memory leaks and state inconsistencies in `DetailsViewModel` by refining job management and simplifies the `ProfileRoot` UI by removing the redundant back navigation button.
- **fix(details)**: Updated `InstallWithExternalApp` logic to correctly handle `CancellationException`, resetting the UI state and clearing asset references when a job is cancelled.
- **fix(details)**: Improved `currentDownloadJob` lifecycle management using `invokeOnCompletion` to prevent race conditions when multiple jobs are launched.
- **refactor(profile)**: Removed the manual navigation icon from `TopAppBar` in `ProfileRoot.kt` and cleaned up associated imports.1 parent 71d707e commit f774d14
File tree
2 files changed
+15
-25
lines changed- feature
- details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation
- profile/presentation/src/commonMain/kotlin/zed/rainxch/profile/presentation
2 files changed
+15
-25
lines changedLines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
782 | | - | |
| 783 | + | |
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
| |||
832 | 833 | | |
833 | 834 | | |
834 | 835 | | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
835 | 841 | | |
836 | 842 | | |
837 | 843 | | |
| |||
850 | 856 | | |
851 | 857 | | |
852 | 858 | | |
853 | | - | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
854 | 865 | | |
855 | 866 | | |
856 | 867 | | |
| |||
feature/profile/presentation/src/commonMain/kotlin/zed/rainxch/profile/presentation/ProfileRoot.kt
Lines changed: 2 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
9 | 7 | | |
10 | | - | |
11 | | - | |
12 | 8 | | |
13 | 9 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 10 | | |
18 | 11 | | |
19 | 12 | | |
| |||
150 | 143 | | |
151 | 144 | | |
152 | 145 | | |
153 | | - | |
| 146 | + | |
154 | 147 | | |
155 | 148 | | |
156 | 149 | | |
| |||
212 | 205 | | |
213 | 206 | | |
214 | 207 | | |
215 | | - | |
| 208 | + | |
216 | 209 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | 210 | | |
232 | 211 | | |
233 | 212 | | |
| |||
0 commit comments