mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 12:08: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> {
|
class _InChatMediaViewerState extends State<InChatMediaViewer> {
|
||||||
File? image;
|
File? image;
|
||||||
File? video;
|
File? video;
|
||||||
|
bool isMounted = true;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -70,6 +71,7 @@ class _InChatMediaViewerState extends State<InChatMediaViewer> {
|
||||||
isSend ? widget.message.mediaUploadId! : widget.message.messageId,
|
isSend ? widget.message.mediaUploadId! : widget.message.messageId,
|
||||||
isSend ? "send" : "received",
|
isSend ? "send" : "received",
|
||||||
);
|
);
|
||||||
|
if (!isMounted) return;
|
||||||
final imagePath = File("$basePath.png");
|
final imagePath = File("$basePath.png");
|
||||||
if (imagePath.existsSync()) {
|
if (imagePath.existsSync()) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
@ -83,6 +85,7 @@ class _InChatMediaViewerState extends State<InChatMediaViewer> {
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
isMounted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue