Conversation
This adds region management: the user can manage a list of available regions and for each channel pick a region from that list to apply to messages. Region discovery from nearby repeaters will be done in a separate PR. This is a part of the work needed for zjs81#120.
| // TODO(clauwn): add community handling | ||
| final isCommunityChannel = false; | ||
| final isCommunityPublic = false; | ||
|
|
||
| if (isCommunityChannel) { | ||
| iconColor = Colors.purple; | ||
| bgColor = Colors.purple.withValues(alpha: 0.2); | ||
| icon = isCommunityPublic ? Icons.groups : Icons.tag; | ||
| } else if (widget.channel.isPublicChannel) { | ||
| icon = Icons.public; | ||
| iconColor = Colors.green; | ||
| bgColor = Colors.green.withValues(alpha: 0.2); | ||
| } else if (widget.channel.isHashtagChannel) { | ||
| icon = Icons.tag; | ||
| } |
There was a problem hiding this comment.
This is code from lib/screens/channels_screen.dart, which includes handling for the community channels. How do we want to manage this, other than duplicating it?
There was a problem hiding this comment.
Probably just a helper instead of duplicating
There was a problem hiding this comment.
I'm mostly talking about the relationships that are kept in a data structure in the channels screen. It's the part that i mentioned a relational database could be nice for
|
Looks good so far. Tested and working as expected. I think for now just move that community channel stuff into a shared helper until we get into a better database for storage where we can have relationships. Or start storing a bool for community channels in the normal community model and storage. |
This adds region management: the user can manage a list of available regions and for each channel pick a region from that list to apply to messages.
Region discovery from nearby repeaters will be done in a separate PR.
This is a part of the work needed for #120.