Skip to content

Add region management#379

Draft
stphnrdmr wants to merge 1 commit intozjs81:devfrom
stphnrdmr:sr-regions
Draft

Add region management#379
stphnrdmr wants to merge 1 commit intozjs81:devfrom
stphnrdmr:sr-regions

Conversation

@stphnrdmr
Copy link
Copy Markdown
Contributor

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.

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.
Comment on lines +185 to +199
// 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;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably just a helper instead of duplicating

Copy link
Copy Markdown
Contributor Author

@stphnrdmr stphnrdmr Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@stphnrdmr stphnrdmr marked this pull request as draft April 14, 2026 11:18
@446564 446564 self-assigned this Apr 16, 2026
@446564
Copy link
Copy Markdown
Collaborator

446564 commented Apr 16, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants