Skip to content

Commit 57058b3

Browse files
committed
fix #262
1 parent 8979c44 commit 57058b3

File tree

5 files changed

+2
-50
lines changed

5 files changed

+2
-50
lines changed

lib/src/views/camera/share_image_components/best_friends_selector.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import 'package:twonly/src/utils/misc.dart';
1010
import 'package:twonly/src/views/components/flame.dart';
1111
import 'package:twonly/src/views/components/headline.dart';
1212
import 'package:twonly/src/views/components/initialsavatar.dart';
13-
import 'package:twonly/src/views/components/verified_shield.dart';
1413

1514
class BestFriendsSelector extends StatelessWidget {
1615
const BestFriendsSelector({
@@ -157,13 +156,6 @@ class UserCheckbox extends StatelessWidget {
157156
children: [
158157
Row(
159158
children: [
160-
if (isRealTwonly)
161-
Padding(
162-
padding: const EdgeInsets.only(right: 2),
163-
child: VerifiedShield(
164-
user,
165-
size: 12,
166-
)),
167159
Text(
168160
displayName.length > 8
169161
? '${displayName.substring(0, 8)}...'

lib/src/views/camera/share_image_editor_view.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import 'package:twonly/src/views/camera/image_editor/data/layer.dart';
2121
import 'package:twonly/src/views/camera/image_editor/layers_viewer.dart';
2222
import 'package:twonly/src/views/camera/image_editor/modules/all_emojis.dart';
2323
import 'package:twonly/src/views/camera/share_image_view.dart';
24-
import 'package:twonly/src/views/components/alert_dialog.dart';
2524
import 'package:twonly/src/views/components/media_view_sizing.dart';
2625
import 'package:twonly/src/views/components/notification_badge.dart';
2726
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
@@ -242,16 +241,6 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
242241
? Theme.of(context).colorScheme.primary
243242
: Colors.white,
244243
onPressed: () async {
245-
if (widget.sendTo != null) {
246-
if (!widget.sendTo!.verified) {
247-
await showAlertDialog(
248-
context,
249-
context.lang.shareImageUserNotVerified,
250-
context.lang.shareImageUserNotVerifiedDesc,
251-
);
252-
return;
253-
}
254-
}
255244
_isRealTwonly = !_isRealTwonly;
256245
if (_isRealTwonly) {
257246
maxShowTime = 12;

lib/src/views/camera/share_image_view.dart

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class _ShareImageView extends State<ShareImageView> {
5454
bool sendingImage = false;
5555
bool hideArchivedUsers = true;
5656
final TextEditingController searchUserName = TextEditingController();
57-
bool showRealTwonlyWarning = false;
5857
late StreamSubscription<List<Contact>> contactSub;
5958
String lastQuery = '';
6059

@@ -150,15 +149,6 @@ class _ShareImageView extends State<ShareImageView> {
150149
}
151150

152151
void updateStatus(int userId, bool checked) {
153-
if (widget.isRealTwonly) {
154-
final user = contacts.firstWhere((x) => x.userId == userId);
155-
if (!user.verified) {
156-
showRealTwonlyWarning = true;
157-
setState(() {});
158-
return;
159-
}
160-
}
161-
showRealTwonlyWarning = false;
162152
widget.updateStatus(userId, checked);
163153
setState(() {});
164154
}
@@ -175,13 +165,6 @@ class _ShareImageView extends State<ShareImageView> {
175165
const EdgeInsets.only(bottom: 40, left: 10, top: 20, right: 10),
176166
child: Column(
177167
children: [
178-
if (showRealTwonlyWarning)
179-
Text(
180-
context.lang.shareImageAllTwonlyWarning,
181-
style: const TextStyle(color: Colors.orange, fontSize: 13),
182-
textAlign: TextAlign.center,
183-
),
184-
if (showRealTwonlyWarning) const SizedBox(height: 10),
185168
Padding(
186169
padding: const EdgeInsets.symmetric(horizontal: 10),
187170
child: TextField(

lib/src/views/chats/chat_messages.view.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
297297
children: [
298298
Text(getContactDisplayName(user)),
299299
const SizedBox(width: 10),
300-
VerifiedShield(key: verifyShieldKey, user),
300+
if (user.verified)
301+
VerifiedShield(key: verifyShieldKey, user)
301302
],
302303
),
303304
),

lib/src/views/components/user_context_menu.dart

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:twonly/src/database/twonly_database.dart';
88
import 'package:twonly/src/utils/misc.dart';
99
import 'package:twonly/src/views/chats/chat_messages.view.dart';
1010
import 'package:twonly/src/views/contact/contact.view.dart';
11-
import 'package:twonly/src/views/contact/contact_verify.view.dart';
1211

1312
class UserContextMenu extends StatefulWidget {
1413
const UserContextMenu({
@@ -58,18 +57,6 @@ class _UserContextMenuState extends State<UserContextMenu> {
5857
},
5958
child: const FaIcon(FontAwesomeIcons.boxOpen),
6059
),
61-
if (!widget.contact.verified)
62-
PieAction(
63-
tooltip: Text(context.lang.contextMenuVerifyUser),
64-
onSelect: () {
65-
Navigator.push(context, MaterialPageRoute(
66-
builder: (context) {
67-
return ContactVerifyView(widget.contact);
68-
},
69-
));
70-
},
71-
child: const Icon(Icons.gpp_maybe_rounded),
72-
),
7360
PieAction(
7461
tooltip: Text(context.lang.contextMenuOpenChat),
7562
onSelect: () {

0 commit comments

Comments
 (0)