From 7a140fca6fca817e7581f386ab5df2fe55e1f68a Mon Sep 17 00:00:00 2001 From: krawieck Date: Tue, 8 Sep 2020 19:44:04 +0200 Subject: [PATCH] Add recently banned section and modlog tile --- lib/pages/instance.dart | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/pages/instance.dart b/lib/pages/instance.dart index 74c09f9..35c69e9 100644 --- a/lib/pages/instance.dart +++ b/lib/pages/instance.dart @@ -255,6 +255,7 @@ class _AboutTab extends HookWidget { ), ...site.admins.map((e) => ListTile( title: Text(e.preferredUsername ?? '@${e.name}'), + subtitle: e.bio != null ? Text('${e.bio}') : null, onTap: () => print('GO TO USER ${e.name}'), leading: e.avatar != null ? CachedNetworkImage( @@ -270,6 +271,33 @@ class _AboutTab extends HookWidget { )) : SizedBox(width: 50), )), + _Divider(), + ListTile( + title: Center( + child: Text( + 'Recently banned:', + style: theme.textTheme.headline6.copyWith(fontSize: 18), + ), + ), + ), + ...site.banned.getRange(0, 5).map((e) => ListTile( + // subtitle: Text(), + title: Text( + (e.preferredUsername == null || e.preferredUsername == '') + ? '@${e.name}' + : e.preferredUsername), + onTap: () => print('GO TO USER ${e.name}'), + leading: SizedBox(width: 50), + )), + ListTile( + title: Center(child: Text('See all')), + onTap: () => print('GO TO BANNED USERS PAGE'), + ), + _Divider(), + ListTile( + title: Center(child: Text('Modlog')), + onTap: () => print('GO TO MODLOG'), + ), SizedBox(height: 20), ], ),