Chat list will also show wild group channel

This commit is contained in:
LittleSheep 2024-09-16 21:09:19 +08:00
parent 029e72fb0b
commit 47eb6cbc66
2 changed files with 9 additions and 1 deletions

View File

@ -125,7 +125,11 @@ class _ChatScreenState extends State<ChatScreen> {
child: Obx( child: Obx(
() => ChannelListWidget( () => ChannelListWidget(
noCategory: true, noCategory: true,
channels: _channels.directChannels, channels: List.from([
..._channels.groupChannels
.where((x) => x.realmId == null),
..._channels.directChannels
]),
selfId: selfId, selfId: selfId,
useReplace: true, useReplace: true,
), ),

View File

@ -1,5 +1,8 @@
import 'dart:math';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:gap/gap.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:solian/controllers/chat_events_controller.dart'; import 'package:solian/controllers/chat_events_controller.dart';
import 'package:solian/models/channel.dart'; import 'package:solian/models/channel.dart';
@ -213,6 +216,7 @@ class _ChannelListWidgetState extends State<ChannelListWidget> {
return _buildEntry(element); return _buildEntry(element);
}, },
), ),
SliverGap(max(16, MediaQuery.of(context).padding.bottom)),
], ],
); );
} }