chore: Follow up user viewer

This commit is contained in:
Christian Kußowski 2026-03-09 17:44:11 +01:00
commit a2857ef36a
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
2 changed files with 44 additions and 38 deletions

View file

@ -85,7 +85,7 @@ class AdaptiveDialogAction extends StatelessWidget {
class AdaptiveDialogInkWell extends StatelessWidget {
final Widget child;
final VoidCallback onTap;
final VoidCallback? onTap;
final EdgeInsets padding;
const AdaptiveDialogInkWell({
@ -125,7 +125,7 @@ class AdaptiveDialogInkWell extends StatelessWidget {
class AdaptiveIconTextButton extends StatelessWidget {
final String label;
final IconData icon;
final VoidCallback onTap;
final VoidCallback? onTap;
const AdaptiveIconTextButton({
super.key,
required this.label,

View file

@ -195,7 +195,9 @@ class UserDialog extends StatelessWidget {
AdaptiveIconTextButton(
label: L10n.of(context).block,
icon: Icons.block_outlined,
onTap: () {
onTap: client.userID == profile.userId
? null
: () {
final router = GoRouter.of(context);
Navigator.of(context).pop();
router.go(
@ -207,7 +209,9 @@ class UserDialog extends StatelessWidget {
AdaptiveIconTextButton(
label: L10n.of(context).report,
icon: Icons.gavel_outlined,
onTap: () async {
onTap: client.userID == profile.userId
? null
: () async {
Navigator.of(context).pop();
final reason = await showTextInputDialog(
context: context,
@ -236,7 +240,9 @@ class UserDialog extends StatelessWidget {
],
),
AdaptiveDialogInkWell(
onTap: () async {
onTap: client.userID == profile.userId
? null
: () async {
final router = GoRouter.of(context);
final roomIdResult = await showFutureLoadingDialog(
context: context,