From f4ab7671d86e02265c0941d78363f8459d5caf50 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 5 Jan 2025 12:06:49 +0800 Subject: [PATCH] :bug: Bug fixes on resetting post write controller --- lib/controllers/post_write_controller.dart | 2 ++ lib/main.dart | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/controllers/post_write_controller.dart b/lib/controllers/post_write_controller.dart index 302e156..77749ff 100644 --- a/lib/controllers/post_write_controller.dart +++ b/lib/controllers/post_write_controller.dart @@ -623,6 +623,8 @@ class PostWriteController extends ChangeNotifier { void reset() { publishedAt = null; publishedUntil = null; + thumbnail = null; + visibility = 0; titleController.clear(); descriptionController.clear(); contentController.clear(); diff --git a/lib/main.dart b/lib/main.dart index 9dee5ab..b3761c8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -10,7 +10,6 @@ import 'package:easy_localization_loader/easy_localization_loader.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:gap/gap.dart'; import 'package:go_router/go_router.dart'; import 'package:hive_flutter/hive_flutter.dart'; import 'package:package_info_plus/package_info_plus.dart'; @@ -18,7 +17,6 @@ import 'package:provider/provider.dart'; import 'package:relative_time/relative_time.dart'; import 'package:responsive_framework/responsive_framework.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:styled_widget/styled_widget.dart'; import 'package:surface/firebase_options.dart'; import 'package:surface/providers/channel.dart'; import 'package:surface/providers/chat_call.dart'; @@ -42,7 +40,6 @@ import 'package:surface/types/chat.dart'; import 'package:surface/types/realm.dart'; import 'package:flutter_web_plugins/url_strategy.dart' show usePathUrlStrategy; import 'package:surface/widgets/dialog.dart'; -import 'package:surface/widgets/version_label.dart'; import 'package:version/version.dart'; import 'package:workmanager/workmanager.dart'; import 'package:in_app_review/in_app_review.dart';