|
|
@ -106,15 +106,14 @@ class ChatListItem extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
if (room.membership == Membership.leave) {
|
|
|
|
if (room.membership == Membership.leave) {
|
|
|
|
context.go('/rooms/archive/${room.id}');
|
|
|
|
context.go('/rooms/archive/${room.id}');
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (room.membership == Membership.join) {
|
|
|
|
|
|
|
|
// Share content into this room
|
|
|
|
// Share content into this room
|
|
|
|
final shareContent = Matrix.of(context).shareContent;
|
|
|
|
final shareContent = Matrix.of(context).shareContent;
|
|
|
|
if (shareContent != null) {
|
|
|
|
if (shareContent != null) {
|
|
|
|
final shareFile = shareContent.tryGet<MatrixFile>('file');
|
|
|
|
final shareFile = shareContent.tryGet<MatrixFile>('file');
|
|
|
|
if (shareContent.tryGet<String>('msgtype') ==
|
|
|
|
if (shareContent.tryGet<String>('msgtype') == 'chat.fluffy.shared_file' &&
|
|
|
|
'chat.fluffy.shared_file' &&
|
|
|
|
|
|
|
|
shareFile != null) {
|
|
|
|
shareFile != null) {
|
|
|
|
await showDialog(
|
|
|
|
await showDialog(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
@ -148,7 +147,6 @@ class ChatListItem extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
context.go('/rooms/${room.id}');
|
|
|
|
context.go('/rooms/${room.id}');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> archiveAction(BuildContext context) async {
|
|
|
|
Future<void> archiveAction(BuildContext context) async {
|
|
|
|
{
|
|
|
|
{
|
|
|
|