Archived chats don't show Chat Details or Leave
This commit is contained in:
parent
39c8012137
commit
5f83955544
3 changed files with 30 additions and 13 deletions
|
|
@ -20,6 +20,7 @@ class ArchiveController extends State<Archive> {
|
|||
Future<List<Room>> getArchive(BuildContext context) async {
|
||||
if (archive.isNotEmpty) return archive;
|
||||
// #Pangea
|
||||
//return archive = await Matrix.of(context).client.loadArchive();
|
||||
return archive = (await Matrix.of(context).client.loadArchive())
|
||||
.where((e) => (!e.isSpace && !e.isAnalyticsRoom))
|
||||
.toList();
|
||||
|
|
|
|||
|
|
@ -116,7 +116,8 @@ class ChatView extends StatelessWidget {
|
|||
// #Pangea
|
||||
} else {
|
||||
return [
|
||||
ChatSettingsPopupMenu(controller.room, !controller.room.isDirectChat),
|
||||
ChatSettingsPopupMenu(controller.room,
|
||||
(!controller.room.isDirectChat && !controller.room.isArchived)),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,19 +83,34 @@ class ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
value: 'leave',
|
||||
child: Row(
|
||||
children: [
|
||||
// #Pangea
|
||||
// const Icon(Icons.delete_outlined),
|
||||
const Icon(Icons.arrow_forward),
|
||||
// Pangea#
|
||||
const SizedBox(width: 12),
|
||||
Text(L10n.of(context)!.leave),
|
||||
],
|
||||
// #Pangea
|
||||
// PopupMenuItem<String>(
|
||||
// value: 'leave',
|
||||
// child: Row(
|
||||
// children: [
|
||||
// // #Pangea
|
||||
// // const Icon(Icons.delete_outlined),
|
||||
// const Icon(Icons.arrow_forward),
|
||||
// // Pangea#
|
||||
// const SizedBox(width: 12),
|
||||
// Text(L10n.of(context)!.leave),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
if (!widget.room.isArchived)
|
||||
PopupMenuItem<String>(
|
||||
value: 'leave',
|
||||
child: Row(
|
||||
children: [
|
||||
// #Pangea
|
||||
// const Icon(Icons.delete_outlined),
|
||||
const Icon(Icons.arrow_forward),
|
||||
// Pangea#
|
||||
const SizedBox(width: 12),
|
||||
Text(L10n.of(context)!.leave),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// #Pangea
|
||||
if (classSettings != null)
|
||||
PopupMenuItem<String>(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue