Commit 8ec4f80
committed
feat: Add reset functionality to app renaming
This commit enhances the app renaming feature in the app drawer.
When an app has a custom name (alias), the "Rename" button is now replaced with a "Reset" button if the string is empty. Tapping "Reset" will revert the app's name to its default label. If the app name has not been changed, the button will continue to show "Cancel".
This is achieved by:
- Checking the button's text in the `onClickListener` to differentiate between "Rename" and "Reset" actions.
- Sending an empty string to the `appRenameListener` to signal a reset to the default name.
- Updating the button's text to "Cancel" when the rename dialog is opened.1 parent 0654b04 commit 8ec4f80
File tree
1 file changed
+23
-5
lines changed- app/src/main/java/com/github/codeworkscreativehub/mlauncher/ui/adapter
1 file changed
+23
-5
lines changedLines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
167 | 184 | | |
168 | 185 | | |
169 | 186 | | |
| |||
410 | 427 | | |
411 | 428 | | |
412 | 429 | | |
| 430 | + | |
413 | 431 | | |
414 | 432 | | |
415 | 433 | | |
| |||
0 commit comments