Skip to content

Commit

Permalink
hide mod dashboard buttons for kick
Browse files Browse the repository at this point in the history
  • Loading branch information
LezdCS committed May 24, 2024
1 parent fed82a2 commit 3ad8d08
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 3ad8d08

Please sign in to comment.