show bot in participants list and show different message with kicking bot from group chat
This commit is contained in:
parent
bfdacbf3ad
commit
6268ff27b7
4 changed files with 25 additions and 35 deletions
|
|
@ -3947,5 +3947,6 @@
|
|||
"placeholders": {
|
||||
"age": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"kickBotWarning": "Kicking Pangea Bot will remove the conversation bot from this chat."
|
||||
}
|
||||
|
|
@ -4581,5 +4581,6 @@
|
|||
"age": {}
|
||||
}
|
||||
},
|
||||
"selectToDefine": "Haga doble clic en una palabra para ver su definición."
|
||||
"selectToDefine": "Haga doble clic en una palabra para ver su definición.",
|
||||
"kickBotWarning": "Patear Pangea Bot eliminará el bot de conversación de este chat."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import 'package:fluffychat/utils/adaptive_bottom_sheet.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/pangea/utils/bot_name.dart';
|
||||
import 'package:fluffychat/utils/adaptive_bottom_sheet.dart';
|
||||
import '../../widgets/avatar.dart';
|
||||
import '../user_bottom_sheet/user_bottom_sheet.dart';
|
||||
|
||||
|
|
@ -27,33 +25,16 @@ class ParticipantListItem extends StatelessWidget {
|
|||
? L10n.of(context)!.moderator
|
||||
: '';
|
||||
|
||||
// #Pangea
|
||||
if (user.id == BotName.byEnvironment) {
|
||||
return const SizedBox();
|
||||
}
|
||||
// Pangea#
|
||||
|
||||
return Opacity(
|
||||
//#Pangea
|
||||
// opacity: user.membership == Membership.join? 1 : 0.5,
|
||||
opacity:
|
||||
user.membership == Membership.join && user.id != BotName.byEnvironment
|
||||
? 1
|
||||
: 0.5,
|
||||
//Pangea#
|
||||
opacity: user.membership == Membership.join ? 1 : 0.5,
|
||||
child: ListTile(
|
||||
//#Pangea
|
||||
// onTap: () => showAdaptiveBottomSheet(
|
||||
onTap: user.id == BotName.byEnvironment
|
||||
? null
|
||||
: () => showAdaptiveBottomSheet(
|
||||
//Pangea#
|
||||
context: context,
|
||||
builder: (c) => UserBottomSheet(
|
||||
user: user,
|
||||
outerContext: context,
|
||||
),
|
||||
),
|
||||
onTap: () => showAdaptiveBottomSheet(
|
||||
context: context,
|
||||
builder: (c) => UserBottomSheet(
|
||||
user: user,
|
||||
outerContext: context,
|
||||
),
|
||||
),
|
||||
title: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/pangea/utils/bot_name.dart';
|
||||
import 'package:fluffychat/widgets/permission_slider_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/widgets/permission_slider_dialog.dart';
|
||||
import '../../widgets/matrix.dart';
|
||||
import 'user_bottom_sheet_view.dart';
|
||||
|
||||
|
|
@ -191,7 +191,14 @@ class UserBottomSheetController extends State<UserBottomSheet> {
|
|||
title: L10n.of(context)!.areYouSure,
|
||||
okLabel: L10n.of(context)!.yes,
|
||||
cancelLabel: L10n.of(context)!.no,
|
||||
message: L10n.of(context)!.kickUserDescription,
|
||||
// #Pangea
|
||||
// message: L10n.of(context)!.kickUserDescription,
|
||||
message: user.id == BotName.byEnvironment &&
|
||||
!user.room.isSpace &&
|
||||
!user.room.isDirectChat
|
||||
? L10n.of(context)!.kickBotWarning
|
||||
: L10n.of(context)!.kickUserDescription,
|
||||
// Pangea#
|
||||
) ==
|
||||
OkCancelResult.ok) {
|
||||
await showFutureLoadingDialog(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue