Instead of defining the icons for a source only within the SourceIcon widget, the icons are now defined as extension for the FDSourceType enum. The background and foreground colors are also defined within the enum now. This allows us to access the icon of a source outside of the SourceIcon widget and we only have to touch the source.dart file when adding a new source type.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/feeddeck/feeddeck/pull/76
**Author:** [@ricoberger](https://github.com/ricoberger)
**Created:** 11/26/2023
**Status:** ✅ Merged
**Merged:** 11/26/2023
**Merged by:** [@ricoberger](https://github.com/ricoberger)
**Base:** `main` ← **Head:** `core-improve-icon-handling`
---
### 📝 Commits (1)
- [`bed49e4`](https://github.com/feeddeck/feeddeck/commit/bed49e479f1de8a094eebed15d1e481b4ca7162b) [core] Improve Icon Handling
### 📊 Changes
**3 files changed** (+90 additions, -106 deletions)
<details>
<summary>View changed files</summary>
📝 `app/lib/models/source.dart` (+72 -3)
📝 `app/lib/widgets/source/add/add_source.dart` (+4 -4)
📝 `app/lib/widgets/source/source_icon.dart` (+14 -99)
</details>
### 📄 Description
Instead of defining the icons for a source only within the `SourceIcon` widget, the icons are now defined as extension for the `FDSourceType` enum. The background and foreground colors are also defined within the enum now. This allows us to access the icon of a source outside of the `SourceIcon` widget and we only have to touch the `source.dart` file when adding a new source type.
<!--
Keep PR title verbose enough and add prefix telling about what source it touches e.g "[rss] Add feature xyz" or if the
the PR is not realated to a source use "[core]", e.g. "[core] Fix xyz".
If you add a breaking change within your PR you should add ":warning:" to the title,
e.g. ":warning: [core] My breaking change"
-->
<!--
Description of what have been changed. Please also reference an issue, when available.
-->
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/feeddeck/feeddeck/pull/76
Author: @ricoberger
Created: 11/26/2023
Status: ✅ Merged
Merged: 11/26/2023
Merged by: @ricoberger
Base:
main← Head:core-improve-icon-handling📝 Commits (1)
bed49e4[core] Improve Icon Handling📊 Changes
3 files changed (+90 additions, -106 deletions)
View changed files
📝
app/lib/models/source.dart(+72 -3)📝
app/lib/widgets/source/add/add_source.dart(+4 -4)📝
app/lib/widgets/source/source_icon.dart(+14 -99)📄 Description
Instead of defining the icons for a source only within the
SourceIconwidget, the icons are now defined as extension for theFDSourceTypeenum. The background and foreground colors are also defined within the enum now. This allows us to access the icon of a source outside of theSourceIconwidget and we only have to touch thesource.dartfile when adding a new source type.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.