mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 14:48:41 +00:00
fix bug
This commit is contained in:
parent
3b65e7d7d1
commit
776108d9e7
1 changed files with 3 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ class InChatMediaViewer extends StatefulWidget {
|
|||
class _InChatMediaViewerState extends State<InChatMediaViewer> {
|
||||
File? image;
|
||||
File? video;
|
||||
bool isMounted = true;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
@ -70,6 +71,7 @@ class _InChatMediaViewerState extends State<InChatMediaViewer> {
|
|||
isSend ? widget.message.mediaUploadId! : widget.message.messageId,
|
||||
isSend ? "send" : "received",
|
||||
);
|
||||
if (!isMounted) return;
|
||||
final imagePath = File("$basePath.png");
|
||||
if (imagePath.existsSync()) {
|
||||
setState(() {
|
||||
|
|
@ -83,6 +85,7 @@ class _InChatMediaViewerState extends State<InChatMediaViewer> {
|
|||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
isMounted = false;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
Loading…
Reference in a new issue