mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 04:02:12 +00:00
make it possible to click on the users avatar
This commit is contained in:
parent
52bc628752
commit
d8a3c4a4d7
3 changed files with 31 additions and 6 deletions
|
|
@ -86,6 +86,7 @@ Future<bool> initBackgroundExecution() async {
|
||||||
|
|
||||||
final Mutex _keyValueMutex = Mutex();
|
final Mutex _keyValueMutex = Mutex();
|
||||||
|
|
||||||
|
// ignore: unreachable_from_main
|
||||||
Future<void> handlePeriodicTask({int lastExecutionInSecondsLimit = 120}) async {
|
Future<void> handlePeriodicTask({int lastExecutionInSecondsLimit = 120}) async {
|
||||||
final shouldBeExecuted = await exclusiveAccess(
|
final shouldBeExecuted = await exclusiveAccess(
|
||||||
lockName: 'periodic_task',
|
lockName: 'periodic_task',
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:drift/drift.dart';
|
import 'package:drift/drift.dart' hide Column;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
|
@ -180,9 +180,31 @@ class _ContactViewState extends State<ContactView> {
|
||||||
body: ListView(
|
body: ListView(
|
||||||
key: ValueKey(contact.userId),
|
key: ValueKey(contact.userId),
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Center(
|
||||||
padding: const EdgeInsets.all(10),
|
child: GestureDetector(
|
||||||
child: AvatarIcon(contactId: contact.userId, fontSize: 30),
|
onTap: () {
|
||||||
|
// ignore: inference_failure_on_function_invocation
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
elevation: 0,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
AvatarIcon(contactId: contact.userId, fontSize: 200),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: AvatarIcon(contactId: contact.userId, fontSize: 30),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
|
@ -331,7 +353,9 @@ class _ContactViewState extends State<ContactView> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Text(context.lang.contactUserDiscoveryManualApprovalApprove),
|
child: Text(
|
||||||
|
context.lang.contactUserDiscoveryManualApprovalApprove,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -465,7 +465,7 @@ class _ExampleLabel extends StatelessWidget {
|
||||||
return Align(
|
return Align(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(right: 12, bottom: 0),
|
padding: const EdgeInsets.only(right: 12),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue