Skip to content

Commit

Permalink
Merge pull request #188 from LezdCS/fix/kick-chat
Browse files Browse the repository at this point in the history
hide mod dashboard buttons for kick
  • Loading branch information
LezdCS authored May 24, 2024
2 parents fed82a2 + 3ad8d08 commit 3bacabd
Showing 1 changed file with 37 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,40 +95,47 @@ class ModerationBottomSheet extends StatelessWidget {
),
),
),
InkWell(
onTap: () => controller.deleteMessageInstruction(
controller.homeViewController.selectedMessage.value!,
Visibility(
visible: message.platform == Platform.twitch,
child: InkWell(
onTap: () => controller.deleteMessageInstruction(
controller.homeViewController.selectedMessage.value!,
),
child: moderationViewButton(null, "Delete message"),
),
child: moderationViewButton(null, "Delete message"),
),
const SizedBox(height: 15),
Row(children: [
InkWell(
onTap: () => controller.banMessageInstruction(
controller.homeViewController.selectedMessage.value!,
Visibility(
visible: message.platform == Platform.twitch,

child: Row(children: [
InkWell(
onTap: () => controller.banMessageInstruction(
controller.homeViewController.selectedMessage.value!,
),
child: moderationViewButton(Icons.stop, "Ban"),
),
child: moderationViewButton(Icons.stop, "Ban"),
),
const SizedBox(width: 10),
InkWell(
onTap: () => timeoutDialog(),
child: moderationViewButton(Icons.timer, "Timeout"),
),
const SizedBox(width: 10),
InkWell(
onTap: () => controller.hideUser(
controller.homeViewController.selectedMessage.value!),
child: (controller
.homeViewController.settings.value.hiddenUsersIds!
.firstWhereOrNull((userId) =>
controller.homeViewController.selectedMessage
.value!.authorId ==
userId) !=
null)
? moderationViewButton(Icons.visibility, "Unhide user")
: moderationViewButton(Icons.visibility_off, "Hide user"),
),
]),
const SizedBox(width: 10),
InkWell(
onTap: () => timeoutDialog(),
child: moderationViewButton(Icons.timer, "Timeout"),
),
const SizedBox(width: 10),
InkWell(
onTap: () => controller.hideUser(
controller.homeViewController.selectedMessage.value!),
child: (controller
.homeViewController.settings.value.hiddenUsersIds!
.firstWhereOrNull((userId) =>
controller.homeViewController.selectedMessage
.value!.authorId ==
userId) !=
null)
? moderationViewButton(Icons.visibility, "Unhide user")
: moderationViewButton(Icons.visibility_off, "Hide user"),
),
]),
),
],
),
);
Expand Down

0 comments on commit 3bacabd

Please sign in to comment.