feat: add font family deletion functionality (#1919)
## Summary * **What is the goal of this PR?** 1. Adds font family deletion support to the font download activity so users can remove installed font families directly from the download list. 2. Address an issue where a font family manually deleted in the file browser by user will show as "update" in the `FontDownloadActivity` * **What changes are included?** * Updated button hint label to show `Delete` when deletion is available. * Added confirmation before deleting a selected installed font family. * Refreshed font registry in `fetchAndParseManifest` (for the second goal above) --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**PARTIALLY**_
This commit is contained in:
@@ -86,6 +86,9 @@ class FontDownloadActivity : public Activity {
|
||||
void downloadAll();
|
||||
static bool computeFileCrc32(const char* path, uint32_t& outCrc);
|
||||
bool isDownloadAllSelected() const { return selectedIndex_ == 0 && !families_.empty(); }
|
||||
bool isSelectedFamilyDeletable() const;
|
||||
void promptDeleteSelectedFamily();
|
||||
void onDeleteConfirmationResult(const ActivityResult& result);
|
||||
int familyIndexFromList(int listIndex) const { return listIndex - 1; }
|
||||
int listItemCount() const { return families_.empty() ? 0 : static_cast<int>(families_.size()) + 1; }
|
||||
size_t totalUninstalledSize() const;
|
||||
|
||||
Reference in New Issue
Block a user