mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 11:52:12 +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 {
|
Future<void> createThumbnail() async {
|
||||||
if (!storedPath.existsSync()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
var success = false;
|
var success = false;
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,7 @@ Future<PushNotification?> getPushNotificationFromEncryptedContent(
|
||||||
|
|
||||||
if (content.hasMediaUpdate()) {
|
if (content.hasMediaUpdate()) {
|
||||||
final msg = await twonlyDB.messagesDao
|
final msg = await twonlyDB.messagesDao
|
||||||
.getMessageById(content.reaction.targetMessageId)
|
.getMessageById(content.mediaUpdate.targetMessageId)
|
||||||
.getSingleOrNull();
|
.getSingleOrNull();
|
||||||
// These notifications should only be send to the original sender.
|
// These notifications should only be send to the original sender.
|
||||||
if (msg == null || msg.senderId != toUserId) {
|
if (msg == null || msg.senderId != toUserId) {
|
||||||
|
|
@ -304,7 +304,9 @@ Future<PushNotification?> getPushNotificationFromEncryptedContent(
|
||||||
if (content.hasGroupCreate()) {
|
if (content.hasGroupCreate()) {
|
||||||
kind = PushKind.ADDED_TO_GROUP;
|
kind = PushKind.ADDED_TO_GROUP;
|
||||||
final group = await twonlyDB.groupsDao.getGroup(content.groupId);
|
final group = await twonlyDB.groupsDao.getGroup(content.groupId);
|
||||||
additionalContent = group!.groupName;
|
if (group != null) {
|
||||||
|
additionalContent = group.groupName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind == null) return null;
|
if (kind == null) return null;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,9 @@ class HomeViewState extends State<HomeView> {
|
||||||
streamHomeViewPageIndex.add(0);
|
streamHomeViewPageIndex.add(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
unawaited(_mainCameraController.selectCamera(0, true));
|
if (initialPage == 1) {
|
||||||
|
unawaited(_mainCameraController.selectCamera(0, true));
|
||||||
|
}
|
||||||
unawaited(_initAsync());
|
unawaited(_initAsync());
|
||||||
|
|
||||||
// Subscribe to all events (initial link and further)
|
// Subscribe to all events (initial link and further)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue