Add report button to user modal
This commit is contained in:
parent
d9184a094a
commit
97a742f74c
2 changed files with 20 additions and 10 deletions
|
|
@ -4,6 +4,7 @@ import 'package:frosty/screens/channel/chat/widgets/chat_message.dart';
|
|||
import 'package:frosty/screens/channel/stores/chat_store.dart';
|
||||
import 'package:frosty/widgets/block_button.dart';
|
||||
import 'package:frosty/widgets/profile_picture.dart';
|
||||
import 'package:frosty/widgets/report_button.dart';
|
||||
import 'package:frosty/widgets/section_header.dart';
|
||||
|
||||
class ChatUserModal extends StatelessWidget {
|
||||
|
|
@ -44,20 +45,13 @@ class ChatUserModal extends StatelessWidget {
|
|||
? Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
chatStore.textController.text = '@$username ';
|
||||
Navigator.pop(context);
|
||||
chatStore.textFieldFocusNode.requestFocus();
|
||||
},
|
||||
child: const Text('Reply'),
|
||||
),
|
||||
ReportButton(userLogin: username),
|
||||
const SizedBox(width: 10.0),
|
||||
BlockButton(
|
||||
authStore: chatStore.auth,
|
||||
targetUser: username,
|
||||
targetUserId: userId,
|
||||
)
|
||||
),
|
||||
],
|
||||
)
|
||||
: null,
|
||||
|
|
@ -94,7 +88,22 @@ class ChatUserModal extends StatelessWidget {
|
|||
itemCount: userMessages.length,
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10.0,
|
||||
vertical: 5.0,
|
||||
),
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
chatStore.textController.text = '@$username ';
|
||||
Navigator.pop(context);
|
||||
chatStore.textFieldFocusNode.requestFocus();
|
||||
},
|
||||
child: const Text('Reply'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class ReportButton extends StatelessWidget {
|
|||
return OutlinedButton(
|
||||
onPressed: () => launch('https://www.twitch.tv/$userLogin/report'),
|
||||
child: Text(name == null ? 'Report' : 'Report $name'),
|
||||
style: OutlinedButton.styleFrom(primary: Colors.red),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue