~emersion/goguma-dev

page/list: display user count per channel v1 PROPOSED

delthas: 1
 page/list: display user count per channel

 1 files changed, 13 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/goguma-dev/patches/31332/mbox | git am -3
Learn more about email & git

[PATCH] page/list: display user count per channel Export this patch

---
I have no strong opinions on the particular style we show the user count 
with.

 lib/page/join.dart | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/lib/page/join.dart b/lib/page/join.dart
index b5afe1e..7bc46a3 100644
--- a/lib/page/join.dart
+++ b/lib/page/join.dart
@@ -216,11 +216,22 @@ class _JoinItem extends StatelessWidget {
		);

		if (action is _JoinChannelAction) {
			var subtitleSpans = <TextSpan>[];
			if(action.listReply.clients > 0) {
				subtitleSpans.add(TextSpan(text: '${action.listReply.clients} users', style: TextStyle(fontStyle: FontStyle.italic)));
			}
			var topic = stripAnsiFormatting(action.listReply.topic);
			if(topic != '') {
				if(subtitleSpans.isNotEmpty) {
					topic = '  - $topic';
				}
				subtitleSpans.add(TextSpan(text: topic));
			}
			return ListTile(
				leading: Icon(Icons.tag),
				title: title,
				subtitle: action.listReply.topic == '' ? null : Text(
					stripAnsiFormatting(action.listReply.topic),
				subtitle: subtitleSpans.isEmpty ? null : Text.rich(
					TextSpan(children: subtitleSpans),
					overflow: TextOverflow.fade,
					softWrap: false,
				),

base-commit: 10a2a3232f0dbb959d17500cc75830f8b60b8257
-- 
2.17.1