mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 12:12:13 +00:00
multiple bug issues
This commit is contained in:
parent
df974cd9f7
commit
c77c369212
3 changed files with 15 additions and 4 deletions
|
|
@ -197,7 +197,14 @@ class MediaFileService {
|
|||
|
||||
Future<void> createThumbnail() async {
|
||||
if (!storedPath.existsSync()) {
|
||||
Log.error('Could not create Thumbnail as stored media does not exists.');
|
||||
if (mediaFile.stored &&
|
||||
mediaFile.createdAt.isBefore(
|
||||
clock.now().subtract(const Duration(days: 30)),
|
||||
)) {
|
||||
// media files does not exists any more so also delete the database entry
|
||||
await twonlyDB.mediaFilesDao.deleteMediaFile(mediaFile.mediaId);
|
||||
fullMediaRemoval();
|
||||
}
|
||||
return;
|
||||
}
|
||||
var success = false;
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ Future<PushNotification?> getPushNotificationFromEncryptedContent(
|
|||
|
||||
if (content.hasMediaUpdate()) {
|
||||
final msg = await twonlyDB.messagesDao
|
||||
.getMessageById(content.reaction.targetMessageId)
|
||||
.getMessageById(content.mediaUpdate.targetMessageId)
|
||||
.getSingleOrNull();
|
||||
// These notifications should only be send to the original sender.
|
||||
if (msg == null || msg.senderId != toUserId) {
|
||||
|
|
@ -304,7 +304,9 @@ Future<PushNotification?> getPushNotificationFromEncryptedContent(
|
|||
if (content.hasGroupCreate()) {
|
||||
kind = PushKind.ADDED_TO_GROUP;
|
||||
final group = await twonlyDB.groupsDao.getGroup(content.groupId);
|
||||
additionalContent = group!.groupName;
|
||||
if (group != null) {
|
||||
additionalContent = group.groupName;
|
||||
}
|
||||
}
|
||||
|
||||
if (kind == null) return null;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,9 @@ class HomeViewState extends State<HomeView> {
|
|||
streamHomeViewPageIndex.add(0);
|
||||
});
|
||||
|
||||
unawaited(_mainCameraController.selectCamera(0, true));
|
||||
if (initialPage == 1) {
|
||||
unawaited(_mainCameraController.selectCamera(0, true));
|
||||
}
|
||||
unawaited(_initAsync());
|
||||
|
||||
// Subscribe to all events (initial link and further)
|
||||
|
|
|
|||
Loading…
Reference in a new issue