From 6ff7b7d67f08c2691cc7c64ec54dc79785e53800 Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Mon, 10 Oct 2022 18:26:18 +1030 Subject: [PATCH] Remove redundant print statements --- README.md | 3 +- mobile/lib/views/authentication/login.dart | 1 - .../lib/views/main/conversation/detail.dart | 2 -- mobile/lib/views/main/friend/list.dart | 32 ++++++++++++++----- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ceeddaa..d8ecf2b 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ Encrypted messaging app - Add message pagination - Finish off conversation settings page - Finish message expiry -- Add back button to QR scanner -- Add more padding at message send text box - Fix error when creating existing conversation between friends - Sort conversation based on latest message - Fix admin bool on conversation object frontend +- Fix image picker being patchy on iOS diff --git a/mobile/lib/views/authentication/login.dart b/mobile/lib/views/authentication/login.dart index 1609aa9..57b2af7 100644 --- a/mobile/lib/views/authentication/login.dart +++ b/mobile/lib/views/authentication/login.dart @@ -175,7 +175,6 @@ class _LoginWidgetState extends State { ModalRoute.withName('/home'), ); }).catchError((error) { - print(error); showMessage( 'Could not login to Envelope, please try again later.', context, diff --git a/mobile/lib/views/main/conversation/detail.dart b/mobile/lib/views/main/conversation/detail.dart index 9f71f55..68b89b5 100644 --- a/mobile/lib/views/main/conversation/detail.dart +++ b/mobile/lib/views/main/conversation/detail.dart @@ -84,8 +84,6 @@ class _ConversationDetailState extends State { @override void initState() { - print(widget.conversation.admin); - print(widget.conversation.adminSendMessages); sendDisabled = widget.conversation.adminSendMessages && !widget.conversation.admin; super.initState(); fetchMessages(); diff --git a/mobile/lib/views/main/friend/list.dart b/mobile/lib/views/main/friend/list.dart index 8f19a61..95dab97 100644 --- a/mobile/lib/views/main/friend/list.dart +++ b/mobile/lib/views/main/friend/list.dart @@ -97,26 +97,42 @@ class _FriendListState extends State { } void filterSearchResults(String query) { - List dummySearchList = []; - dummySearchList.addAll(friends); + List dummyFriendsList = []; + List dummyFriendRequestsList = []; + dummyFriendsList.addAll(friends); + dummyFriendRequestsList.addAll(friendRequests); - if(query.isNotEmpty) { - List dummyListData = []; - for (Friend item in dummySearchList) { + if (query.isNotEmpty) { + List dummyFriendData = []; + List dummyFriendRequestData = []; + + for (Friend item in dummyFriendsList) { if(item.username.toLowerCase().contains(query)) { - dummyListData.add(item); + dummyFriendData.add(item); } } + + for (Friend item in dummyFriendRequestsList) { + if(item.username.toLowerCase().contains(query)) { + dummyFriendRequestData.add(item); + } + } + + setState(() { friends.clear(); - friends.addAll(dummyListData); + friends.addAll(dummyFriendData); + friendRequests.clear(); + friendRequests.addAll(dummyFriendRequestData); }); return; } setState(() { friends.clear(); - friends.addAll(friends); + friends.addAll(widget.friends); + friendRequests.clear(); + friendRequests.addAll(widget.friendRequests); }); }