chore: Follow up user viewer
This commit is contained in:
parent
1e763f05f5
commit
a2857ef36a
2 changed files with 44 additions and 38 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue