|
|
|
@ -10,6 +10,7 @@ import 'package:famedlysdk/famedlysdk.dart';
|
|
|
|
|
import 'package:file_picker_cross/file_picker_cross.dart';
|
|
|
|
|
import 'package:fluffychat/views/widgets/chat_settings_popup_menu.dart';
|
|
|
|
|
import 'package:fluffychat/views/widgets/content_banner.dart';
|
|
|
|
|
import 'package:fluffychat/views/widgets/max_width_body.dart';
|
|
|
|
|
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
|
|
|
|
import 'package:fluffychat/views/widgets/list_items/participant_list_item.dart';
|
|
|
|
|
import 'package:fluffychat/utils/matrix_locals.dart';
|
|
|
|
@ -234,8 +235,10 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
body: ListView.builder(
|
|
|
|
|
itemCount: members.length + 1 + (canRequestMoreMembers ? 1 : 0),
|
|
|
|
|
body: MaxWidthBody(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemCount:
|
|
|
|
|
members.length + 1 + (canRequestMoreMembers ? 1 : 0),
|
|
|
|
|
itemBuilder: (BuildContext context, int i) => i == 0
|
|
|
|
|
? Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
|
@ -250,7 +253,8 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
child: Icon(Icons.edit_outlined),
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
title: Text('${L10n.of(context).groupDescription}:',
|
|
|
|
|
title: Text(
|
|
|
|
|
'${L10n.of(context).groupDescription}:',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Theme.of(context).accentColor,
|
|
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
|
@ -261,8 +265,10 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
linkStyle: TextStyle(color: Colors.blueAccent),
|
|
|
|
|
textStyle: TextStyle(
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color:
|
|
|
|
|
Theme.of(context).textTheme.bodyText2.color,
|
|
|
|
|
color: Theme.of(context)
|
|
|
|
|
.textTheme
|
|
|
|
|
.bodyText2
|
|
|
|
|
.color,
|
|
|
|
|
),
|
|
|
|
|
onLinkTap: (url) =>
|
|
|
|
|
UrlLauncher(context, url).launchUrl(),
|
|
|
|
@ -331,8 +337,8 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
await AdaptivePageLayout.of(context)
|
|
|
|
|
.pushNamed('/rooms/${room.id}/emotes');
|
|
|
|
|
} else {
|
|
|
|
|
await AdaptivePageLayout.of(context).pushNamed(
|
|
|
|
|
'/settings/emotes',
|
|
|
|
|
await AdaptivePageLayout.of(context)
|
|
|
|
|
.pushNamed('/settings/emotes',
|
|
|
|
|
arguments: {'room': room});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -362,12 +368,12 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
],
|
|
|
|
|
child: ListTile(
|
|
|
|
|
leading: CircleAvatar(
|
|
|
|
|
backgroundColor:
|
|
|
|
|
Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
|
backgroundColor: Theme.of(context)
|
|
|
|
|
.scaffoldBackgroundColor,
|
|
|
|
|
foregroundColor: Colors.grey,
|
|
|
|
|
child: Icon(Icons.public_outlined)),
|
|
|
|
|
title: Text(
|
|
|
|
|
L10n.of(context).whoIsAllowedToJoinThisGroup),
|
|
|
|
|
title: Text(L10n.of(context)
|
|
|
|
|
.whoIsAllowedToJoinThisGroup),
|
|
|
|
|
subtitle: Text(
|
|
|
|
|
room.joinRules.getLocalizedString(
|
|
|
|
|
MatrixLocals(L10n.of(context))),
|
|
|
|
@ -375,11 +381,12 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
PopupMenuButton(
|
|
|
|
|
onSelected: (HistoryVisibility historyVisibility) =>
|
|
|
|
|
onSelected:
|
|
|
|
|
(HistoryVisibility historyVisibility) =>
|
|
|
|
|
showFutureLoadingDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
future: () =>
|
|
|
|
|
room.setHistoryVisibility(historyVisibility),
|
|
|
|
|
future: () => room
|
|
|
|
|
.setHistoryVisibility(historyVisibility),
|
|
|
|
|
),
|
|
|
|
|
itemBuilder: (BuildContext context) =>
|
|
|
|
|
<PopupMenuEntry<HistoryVisibility>>[
|
|
|
|
@ -419,8 +426,8 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
foregroundColor: Colors.grey,
|
|
|
|
|
child: Icon(Icons.visibility_outlined),
|
|
|
|
|
),
|
|
|
|
|
title: Text(
|
|
|
|
|
L10n.of(context).visibilityOfTheChatHistory),
|
|
|
|
|
title: Text(L10n.of(context)
|
|
|
|
|
.visibilityOfTheChatHistory),
|
|
|
|
|
subtitle: Text(
|
|
|
|
|
room.historyVisibility.getLocalizedString(
|
|
|
|
|
MatrixLocals(L10n.of(context))),
|
|
|
|
@ -432,7 +439,8 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
onSelected: (GuestAccess guestAccess) =>
|
|
|
|
|
showFutureLoadingDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
future: () => room.setGuestAccess(guestAccess),
|
|
|
|
|
future: () =>
|
|
|
|
|
room.setGuestAccess(guestAccess),
|
|
|
|
|
),
|
|
|
|
|
itemBuilder: (BuildContext context) =>
|
|
|
|
|
<PopupMenuEntry<GuestAccess>>[
|
|
|
|
@ -448,15 +456,16 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
PopupMenuItem<GuestAccess>(
|
|
|
|
|
value: GuestAccess.forbidden,
|
|
|
|
|
child: Text(
|
|
|
|
|
GuestAccess.forbidden.getLocalizedString(
|
|
|
|
|
GuestAccess.forbidden
|
|
|
|
|
.getLocalizedString(
|
|
|
|
|
MatrixLocals(L10n.of(context))),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
child: ListTile(
|
|
|
|
|
leading: CircleAvatar(
|
|
|
|
|
backgroundColor:
|
|
|
|
|
Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
|
backgroundColor: Theme.of(context)
|
|
|
|
|
.scaffoldBackgroundColor,
|
|
|
|
|
foregroundColor: Colors.grey,
|
|
|
|
|
child: Icon(Icons.info_outline),
|
|
|
|
|
),
|
|
|
|
@ -470,8 +479,8 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
),
|
|
|
|
|
ListTile(
|
|
|
|
|
title: Text(L10n.of(context).editChatPermissions),
|
|
|
|
|
subtitle:
|
|
|
|
|
Text(L10n.of(context).whoCanPerformWhichAction),
|
|
|
|
|
subtitle: Text(
|
|
|
|
|
L10n.of(context).whoCanPerformWhichAction),
|
|
|
|
|
leading: CircleAvatar(
|
|
|
|
|
backgroundColor:
|
|
|
|
|
Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
@ -529,6 +538,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|