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 {
|
class AdaptiveDialogInkWell extends StatelessWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
final VoidCallback onTap;
|
final VoidCallback? onTap;
|
||||||
final EdgeInsets padding;
|
final EdgeInsets padding;
|
||||||
|
|
||||||
const AdaptiveDialogInkWell({
|
const AdaptiveDialogInkWell({
|
||||||
|
|
@ -125,7 +125,7 @@ class AdaptiveDialogInkWell extends StatelessWidget {
|
||||||
class AdaptiveIconTextButton extends StatelessWidget {
|
class AdaptiveIconTextButton extends StatelessWidget {
|
||||||
final String label;
|
final String label;
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
final VoidCallback onTap;
|
final VoidCallback? onTap;
|
||||||
const AdaptiveIconTextButton({
|
const AdaptiveIconTextButton({
|
||||||
super.key,
|
super.key,
|
||||||
required this.label,
|
required this.label,
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,9 @@ class UserDialog extends StatelessWidget {
|
||||||
AdaptiveIconTextButton(
|
AdaptiveIconTextButton(
|
||||||
label: L10n.of(context).block,
|
label: L10n.of(context).block,
|
||||||
icon: Icons.block_outlined,
|
icon: Icons.block_outlined,
|
||||||
onTap: () {
|
onTap: client.userID == profile.userId
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
final router = GoRouter.of(context);
|
final router = GoRouter.of(context);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
router.go(
|
router.go(
|
||||||
|
|
@ -207,7 +209,9 @@ class UserDialog extends StatelessWidget {
|
||||||
AdaptiveIconTextButton(
|
AdaptiveIconTextButton(
|
||||||
label: L10n.of(context).report,
|
label: L10n.of(context).report,
|
||||||
icon: Icons.gavel_outlined,
|
icon: Icons.gavel_outlined,
|
||||||
onTap: () async {
|
onTap: client.userID == profile.userId
|
||||||
|
? null
|
||||||
|
: () async {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
final reason = await showTextInputDialog(
|
final reason = await showTextInputDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
@ -236,7 +240,9 @@ class UserDialog extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
AdaptiveDialogInkWell(
|
AdaptiveDialogInkWell(
|
||||||
onTap: () async {
|
onTap: client.userID == profile.userId
|
||||||
|
? null
|
||||||
|
: () async {
|
||||||
final router = GoRouter.of(context);
|
final router = GoRouter.of(context);
|
||||||
final roomIdResult = await showFutureLoadingDialog(
|
final roomIdResult = await showFutureLoadingDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue