handleCleanResult handles the result of an async clean operation.
(msg cleanResultMsg)
| 1806 | |
| 1807 | // handleCleanResult handles the result of an async clean operation. |
| 1808 | func (a App) handleCleanResult(msg cleanResultMsg) (tea.Model, tea.Cmd) { |
| 1809 | a.picker.CancelCleanConfirmation() |
| 1810 | a.picker.SetCleanResult(&CleanResult{ |
| 1811 | Success: msg.success, |
| 1812 | Message: msg.message, |
| 1813 | }) |
| 1814 | |
| 1815 | if msg.success { |
| 1816 | // Clear worktree info from manager |
| 1817 | if a.manager != nil { |
| 1818 | a.manager.ClearWorktreeInfo(msg.prdName, msg.clearBranch) |
| 1819 | } |
| 1820 | a.picker.Refresh() |
| 1821 | a.lastActivity = fmt.Sprintf("Cleaned worktree for %s", msg.prdName) |
| 1822 | } |
| 1823 | |
| 1824 | return a, nil |
| 1825 | } |
| 1826 | |
| 1827 | // renderHelpView renders the help overlay. |
| 1828 | func (a *App) renderHelpView() string { |
no test coverage detected