Commit 9ada91e
committed
refactor(performance): Make AppViewHolder a static nested class
The `AppViewHolder` in `FavoriteAdapter` has been converted from an `inner` class to a static nested class. This is a performance optimization that prevents the `AppViewHolder` from holding an implicit reference to the outer `FavoriteAdapter` instance, reducing potential memory leaks.
Additionally, a minor refinement has been made in `HomeFragment`:
- A placeholder text "Select an app" is now displayed for newly added home screen app slots until an app is chosen.
- The inflated `TextView` has been renamed from `view` to the more descriptive `homeAppLabel` for better code clarity.1 parent 3217910 commit 9ada91e
File tree
2 files changed
+9
-5
lines changed- app/src/main/java/com/github/droidworksstudio/mlauncher/ui
- adapter
2 files changed
+9
-5
lines changedLines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
990 | | - | |
991 | | - | |
| 990 | + | |
| 991 | + | |
992 | 992 | | |
993 | 993 | | |
994 | | - | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
995 | 999 | | |
996 | 1000 | | |
997 | 1001 | | |
| |||
1140 | 1144 | | |
1141 | 1145 | | |
1142 | 1146 | | |
1143 | | - | |
| 1147 | + | |
1144 | 1148 | | |
1145 | 1149 | | |
1146 | 1150 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments