From 09ba4f32fc23ce8f02e046ec355b6aa3693dda85 Mon Sep 17 00:00:00 2001 From: krawieck Date: Fri, 1 Oct 2021 23:39:43 +0200 Subject: [PATCH] move files around so that it makes more sense --- .../full_post}/comment_section.dart | 18 +++++++++--------- lib/pages/full_post/full_post.dart | 4 ++-- .../full_post}/full_post_store.dart | 2 +- .../full_post}/full_post_store.g.dart | 0 lib/widgets/post/post_more_menu.dart | 2 +- lib/widgets/post/post_store.dart | 1 + 6 files changed, 14 insertions(+), 13 deletions(-) rename lib/{widgets => pages/full_post}/comment_section.dart (92%) rename lib/{widgets/post => pages/full_post}/full_post_store.dart (98%) rename lib/{widgets/post => pages/full_post}/full_post_store.g.dart (100%) diff --git a/lib/widgets/comment_section.dart b/lib/pages/full_post/comment_section.dart similarity index 92% rename from lib/widgets/comment_section.dart rename to lib/pages/full_post/comment_section.dart index e8a4477..43d508c 100644 --- a/lib/widgets/comment_section.dart +++ b/lib/pages/full_post/comment_section.dart @@ -1,15 +1,15 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import '../comment_tree.dart'; -import '../l10n/l10n.dart'; -import '../pages/full_post/full_post.dart'; -import '../stores/accounts_store.dart'; -import '../util/observer_consumers.dart'; -import 'bottom_modal.dart'; -import 'bottom_safe.dart'; -import 'comment/comment.dart'; -import 'post/full_post_store.dart'; +import '../../comment_tree.dart'; +import '../../l10n/l10n.dart'; +import '../../stores/accounts_store.dart'; +import '../../util/observer_consumers.dart'; +import '../../widgets/bottom_modal.dart'; +import '../../widgets/bottom_safe.dart'; +import '../../widgets/comment/comment.dart'; +import 'full_post.dart'; +import 'full_post_store.dart'; class _SortSelection { final IconData icon; diff --git a/lib/pages/full_post/full_post.dart b/lib/pages/full_post/full_post.dart index 573b156..c17bf50 100644 --- a/lib/pages/full_post/full_post.dart +++ b/lib/pages/full_post/full_post.dart @@ -15,14 +15,14 @@ import '../../util/icons.dart'; import '../../util/observer_consumers.dart'; import '../../util/share.dart'; import '../../util/unawaited.dart'; -import '../../widgets/comment_section.dart'; -import '../../widgets/post/full_post_store.dart'; import '../../widgets/post/post.dart'; import '../../widgets/post/post_more_menu.dart'; import '../../widgets/post/post_store.dart'; import '../../widgets/post/save_post_button.dart'; import '../../widgets/reveal_after_scroll.dart'; import '../../widgets/write_comment.dart'; +import 'comment_section.dart'; +import 'full_post_store.dart'; class FullPostPage extends StatelessWidget { final String? instanceHost; diff --git a/lib/widgets/post/full_post_store.dart b/lib/pages/full_post/full_post_store.dart similarity index 98% rename from lib/widgets/post/full_post_store.dart rename to lib/pages/full_post/full_post_store.dart index c1ef3d1..4cb44f6 100644 --- a/lib/widgets/post/full_post_store.dart +++ b/lib/pages/full_post/full_post_store.dart @@ -3,7 +3,7 @@ import 'package:mobx/mobx.dart'; import '../../comment_tree.dart'; import '../../util/async_store.dart'; -import 'post_store.dart'; +import '../../widgets/post/post_store.dart'; part 'full_post_store.g.dart'; diff --git a/lib/widgets/post/full_post_store.g.dart b/lib/pages/full_post/full_post_store.g.dart similarity index 100% rename from lib/widgets/post/full_post_store.g.dart rename to lib/pages/full_post/full_post_store.g.dart diff --git a/lib/widgets/post/post_more_menu.dart b/lib/widgets/post/post_more_menu.dart index 37839ec..238f7a5 100644 --- a/lib/widgets/post/post_more_menu.dart +++ b/lib/widgets/post/post_more_menu.dart @@ -7,12 +7,12 @@ import 'package:url_launcher/url_launcher.dart' as ul; import '../../hooks/logged_in_action.dart'; import '../../pages/create_post.dart'; +import '../../pages/full_post/full_post_store.dart'; import '../../stores/accounts_store.dart'; import '../../util/icons.dart'; import '../../util/observer_consumers.dart'; import '../bottom_modal.dart'; import '../info_table_popup.dart'; -import 'full_post_store.dart'; import 'post_store.dart'; class PostMoreMenuButton extends StatelessWidget { diff --git a/lib/widgets/post/post_store.dart b/lib/widgets/post/post_store.dart index 1adbfb0..94c58d2 100644 --- a/lib/widgets/post/post_store.dart +++ b/lib/widgets/post/post_store.dart @@ -72,6 +72,7 @@ abstract class _PostStore with Store { } @action + // ignore: use_setters_to_change_properties void updatePostView(PostView postView) { this.postView = postView; }