mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 05:22:13 +00:00
fix verification badge on the wrong side
This commit is contained in:
parent
c54265495c
commit
836e58ec3a
4 changed files with 24 additions and 16 deletions
|
|
@ -37,7 +37,8 @@ class ChatMessagesView extends StatefulWidget {
|
||||||
State<ChatMessagesView> createState() => _ChatMessagesViewState();
|
State<ChatMessagesView> createState() => _ChatMessagesViewState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ChatMessagesViewState extends State<ChatMessagesView> with WidgetsBindingObserver {
|
class _ChatMessagesViewState extends State<ChatMessagesView>
|
||||||
|
with WidgetsBindingObserver {
|
||||||
HashSet<int> alreadyReportedOpened = HashSet<int>();
|
HashSet<int> alreadyReportedOpened = HashSet<int>();
|
||||||
late StreamSubscription<Group?> userSub;
|
late StreamSubscription<Group?> userSub;
|
||||||
late StreamSubscription<List<Message>> messageSub;
|
late StreamSubscription<List<Message>> messageSub;
|
||||||
|
|
@ -287,7 +288,7 @@ class _ChatMessagesViewState extends State<ChatMessagesView> with WidgetsBinding
|
||||||
Text(
|
Text(
|
||||||
substringBy(group.groupName, 20),
|
substringBy(group.groupName, 20),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 5),
|
||||||
VerificationBadgeComp(
|
VerificationBadgeComp(
|
||||||
key: verifyShieldKey,
|
key: verifyShieldKey,
|
||||||
group: group,
|
group: group,
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import 'package:twonly/src/database/twonly.db.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/visual/components/avatar_icon.comp.dart';
|
import 'package:twonly/src/visual/components/avatar_icon.comp.dart';
|
||||||
import 'package:twonly/src/visual/components/flame_counter.comp.dart';
|
import 'package:twonly/src/visual/components/flame_counter.comp.dart';
|
||||||
|
import 'package:twonly/src/visual/components/verification_badge.comp.dart';
|
||||||
import 'package:twonly/src/visual/context_menu/group.context_menu.dart';
|
import 'package:twonly/src/visual/context_menu/group.context_menu.dart';
|
||||||
import 'package:twonly/src/visual/context_menu/user.context_menu.dart';
|
import 'package:twonly/src/visual/context_menu/user.context_menu.dart';
|
||||||
import 'package:twonly/src/visual/decorations/input_text.decoration.dart';
|
import 'package:twonly/src/visual/decorations/input_text.decoration.dart';
|
||||||
|
|
@ -222,9 +223,17 @@ class _StartNewChatView extends State<StartNewChatView> {
|
||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(getContactDisplayName(filteredContacts[i])),
|
Text(getContactDisplayName(filteredContacts[i])),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 8,
|
||||||
|
left: 1,
|
||||||
|
),
|
||||||
|
child: VerificationBadgeComp(
|
||||||
|
contact: filteredContacts[i],
|
||||||
|
),
|
||||||
|
),
|
||||||
FlameCounterWidget(
|
FlameCounterWidget(
|
||||||
contactId: filteredContacts[i].userId,
|
contactId: filteredContacts[i].userId,
|
||||||
prefix: true,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -186,19 +186,18 @@ class _ContactViewState extends State<ContactView> {
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(right: 10),
|
|
||||||
child: VerificationBadgeComp(
|
|
||||||
contact: contact,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
Text(
|
||||||
getContactDisplayName(contact, maxLength: 20),
|
getContactDisplayName(contact, maxLength: 20),
|
||||||
style: const TextStyle(fontSize: 20),
|
style: const TextStyle(fontSize: 20),
|
||||||
),
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 1, right: 8),
|
||||||
|
child: VerificationBadgeComp(
|
||||||
|
contact: contact,
|
||||||
|
),
|
||||||
|
),
|
||||||
FlameCounterWidget(
|
FlameCounterWidget(
|
||||||
contactId: contact.userId,
|
contactId: contact.userId,
|
||||||
prefix: true,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -178,20 +178,19 @@ class _GroupViewState extends State<GroupView> {
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
Text(
|
||||||
|
substringBy(_group!.groupName, 25),
|
||||||
|
style: const TextStyle(fontSize: 20),
|
||||||
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 10),
|
padding: const EdgeInsets.only(right: 8, left: 1),
|
||||||
child: VerificationBadgeComp(
|
child: VerificationBadgeComp(
|
||||||
key: Key(_group!.groupId),
|
key: Key(_group!.groupId),
|
||||||
group: _group,
|
group: _group,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
|
||||||
substringBy(_group!.groupName, 25),
|
|
||||||
style: const TextStyle(fontSize: 20),
|
|
||||||
),
|
|
||||||
FlameCounterWidget(
|
FlameCounterWidget(
|
||||||
groupId: _group?.groupId,
|
groupId: _group?.groupId,
|
||||||
prefix: true,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue