mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-04-18 14:22:53 +00:00
fixes multiple issues
This commit is contained in:
parent
48bfc774c2
commit
083faaa876
6 changed files with 34 additions and 10 deletions
|
|
@ -3,13 +3,16 @@
|
|||
## 0.1.3
|
||||
|
||||
- New: Video stabilization
|
||||
- New: Crop or rotate images before share them
|
||||
- New: Crop or rotate images before sharing them.
|
||||
- New: Clicking on “Text Notifications” will now open the chat directly (Android only)
|
||||
- New: Developer settings to reduce flames
|
||||
- Improve: Improved troubleshooting for issues with push notifications
|
||||
- Improve: A message appears if someone has deleted their account.
|
||||
- Improve: Make the verification badge more visible.
|
||||
- Fix: Flash not activated when starting a video recording
|
||||
- Fix: Problem sending media when a recipient has deleted their account.
|
||||
- Fix: Receive push notifications without receiving an in-app message (Android)
|
||||
- Fix: Issue with sending GIFs from Memories
|
||||
- Fix: Incorrect processing of messages that have already been fetched from the server causes the UI to freeze
|
||||
|
||||
## 0.1.1
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
|||
mediaService.tempPath.deleteSync();
|
||||
}
|
||||
if (mediaService.originalPath.existsSync()) {
|
||||
if (media.type != MediaType.video) {
|
||||
if (media.type == MediaType.image) {
|
||||
mediaService.originalPath.deleteSync();
|
||||
}
|
||||
}
|
||||
|
|
@ -516,8 +516,6 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
|||
if (media.type == MediaType.gif) {
|
||||
if (bytes != null) {
|
||||
mediaService.originalPath.writeAsBytesSync(bytes.toList());
|
||||
} else {
|
||||
Log.error('Could not load image bytes for gif!');
|
||||
}
|
||||
} else {
|
||||
image = await getEditedImageBytes();
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class _UserListItem extends State<GroupListItem> {
|
|||
List<Message> _previewMessages = [];
|
||||
final List<MediaFile> _previewMediaFiles = [];
|
||||
bool _hasNonOpenedMediaFile = false;
|
||||
bool _receiverDeletedAccount = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
@ -61,7 +62,7 @@ class _UserListItem extends State<GroupListItem> {
|
|||
super.dispose();
|
||||
}
|
||||
|
||||
void initStreams() {
|
||||
Future<void> initStreams() async {
|
||||
_lastMessageStream = twonlyDB.messagesDao
|
||||
.watchLastMessage(widget.group.groupId)
|
||||
.listen((update) {
|
||||
|
|
@ -99,6 +100,13 @@ class _UserListItem extends State<GroupListItem> {
|
|||
}
|
||||
setState(() {});
|
||||
});
|
||||
|
||||
final groupContacts = await twonlyDB.groupsDao.getGroupContact(
|
||||
widget.group.groupId,
|
||||
);
|
||||
if (groupContacts.length == 1) {
|
||||
_receiverDeletedAccount = groupContacts.first.accountDeleted;
|
||||
}
|
||||
}
|
||||
|
||||
Mutex protectUpdateState = Mutex();
|
||||
|
|
@ -133,6 +141,9 @@ class _UserListItem extends State<GroupListItem> {
|
|||
)) {
|
||||
_currentMessage = newLastMessage;
|
||||
_previewMessages = [newLastMessage];
|
||||
} else {
|
||||
_currentMessage = null;
|
||||
_previewMessages = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -220,7 +231,9 @@ class _UserListItem extends State<GroupListItem> {
|
|||
),
|
||||
],
|
||||
),
|
||||
subtitle: (_currentMessage == null)
|
||||
subtitle: _receiverDeletedAccount
|
||||
? Text(context.lang.userDeletedAccount)
|
||||
: (_currentMessage == null)
|
||||
? (widget.group.totalMediaCounter == 0)
|
||||
? Text(context.lang.chatsTapToSend)
|
||||
: Row(
|
||||
|
|
@ -267,7 +280,7 @@ class _UserListItem extends State<GroupListItem> {
|
|||
},
|
||||
child: AvatarIcon(group: widget.group),
|
||||
),
|
||||
trailing: (widget.group.leftGroup)
|
||||
trailing: (widget.group.leftGroup || _receiverDeletedAccount)
|
||||
? null
|
||||
: IconButton(
|
||||
onPressed: () {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import 'package:twonly/src/database/twonly.db.dart';
|
|||
import 'package:twonly/src/model/memory_item.model.dart';
|
||||
import 'package:twonly/src/services/api/messages.dart';
|
||||
import 'package:twonly/src/services/notifications/background.notifications.dart';
|
||||
import 'package:twonly/src/utils/misc.dart';
|
||||
import 'package:twonly/src/views/chats/chat_messages_components/chat_group_action.dart';
|
||||
import 'package:twonly/src/views/chats/chat_messages_components/chat_list_entry.dart';
|
||||
import 'package:twonly/src/views/chats/chat_messages_components/entries/chat_date_chip.dart';
|
||||
|
|
@ -53,6 +54,7 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
|
|||
late FocusNode textFieldFocus;
|
||||
final ItemScrollController itemScrollController = ItemScrollController();
|
||||
int? focusedScrollItem;
|
||||
bool _receiverDeletedAccount = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
@ -107,6 +109,13 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
|
|||
await setMessages(update, groupActions);
|
||||
});
|
||||
});
|
||||
|
||||
final groupContacts = await twonlyDB.groupsDao.getGroupContact(
|
||||
widget.groupId,
|
||||
);
|
||||
if (groupContacts.length == 1) {
|
||||
_receiverDeletedAccount = groupContacts.first.accountDeleted;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> setMessages(
|
||||
|
|
@ -334,7 +343,7 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
|
|||
],
|
||||
),
|
||||
),
|
||||
if (!group.leftGroup)
|
||||
if (!group.leftGroup && !_receiverDeletedAccount)
|
||||
MessageInput(
|
||||
group: group,
|
||||
quotesMessage: quotesMessage,
|
||||
|
|
@ -345,6 +354,8 @@ class _ChatMessagesViewState extends State<ChatMessagesView> {
|
|||
});
|
||||
},
|
||||
),
|
||||
if (_receiverDeletedAccount)
|
||||
Text(context.lang.userDeletedAccount),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import 'package:twonly/src/views/components/better_list_title.dart';
|
|||
import 'package:twonly/src/views/components/flame.dart';
|
||||
import 'package:twonly/src/views/components/max_flame_list_title.dart';
|
||||
import 'package:twonly/src/views/components/select_chat_deletion_time.comp.dart';
|
||||
import 'package:twonly/src/views/components/svg_icon.dart';
|
||||
import 'package:twonly/src/views/components/verified_shield.dart';
|
||||
import 'package:twonly/src/views/groups/group.view.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ description: "twonly, a privacy-friendly way to connect with friends through sec
|
|||
|
||||
publish_to: 'none'
|
||||
|
||||
version: 0.1.2+102
|
||||
version: 0.1.3+103
|
||||
|
||||
environment:
|
||||
sdk: ^3.11.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue