mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-03-03 13:56:45 +00:00
Fix: open chat after the image expires in case a draft message exists
This commit is contained in:
parent
15096056c0
commit
3bb2620369
2 changed files with 13 additions and 1 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
- Feature: Verification checkmark for friends
|
- Feature: Verification checkmark for friends
|
||||||
- Fix: Added contacts in contact sharing where not click able
|
- Fix: Added contacts in contact sharing where not click able
|
||||||
|
- Fix: Open chat after the image expires in case a draft message exists
|
||||||
- Fix: Restore flames as a plus user
|
- Fix: Restore flames as a plus user
|
||||||
- Fix: Route not found when sharing image
|
- Fix: Route not found when sharing image
|
||||||
- Fix: Increase recent limit in emoji keyboard
|
- Fix: Increase recent limit in emoji keyboard
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@ import 'package:clock/clock.dart';
|
||||||
import 'package:drift/drift.dart' show Value;
|
import 'package:drift/drift.dart' show Value;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:lottie/lottie.dart';
|
import 'package:lottie/lottie.dart';
|
||||||
import 'package:no_screenshot/no_screenshot.dart';
|
import 'package:no_screenshot/no_screenshot.dart';
|
||||||
import 'package:photo_view/photo_view.dart';
|
import 'package:photo_view/photo_view.dart';
|
||||||
import 'package:twonly/globals.dart';
|
import 'package:twonly/globals.dart';
|
||||||
|
import 'package:twonly/src/constants/routes.keys.dart';
|
||||||
import 'package:twonly/src/database/daos/contacts.dao.dart';
|
import 'package:twonly/src/database/daos/contacts.dao.dart';
|
||||||
import 'package:twonly/src/database/tables/mediafiles.table.dart'
|
import 'package:twonly/src/database/tables/mediafiles.table.dart'
|
||||||
show DownloadState, MediaType;
|
show DownloadState, MediaType;
|
||||||
|
|
@ -153,7 +155,16 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
progressTimer?.cancel();
|
progressTimer?.cancel();
|
||||||
|
|
||||||
if (allMediaFiles.isEmpty) {
|
if (allMediaFiles.isEmpty) {
|
||||||
|
final group = await twonlyDB.groupsDao.getGroup(widget.group.groupId);
|
||||||
|
if (mounted) {
|
||||||
|
if (group != null &&
|
||||||
|
group.draftMessage != null &&
|
||||||
|
group.draftMessage != '') {
|
||||||
|
context.replace(Routes.chatsMessages, extra: group);
|
||||||
|
} else {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
await loadCurrentMediaFile();
|
await loadCurrentMediaFile();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue