💄 Better attachments in posts

This commit is contained in:
2024-07-26 14:21:00 +08:00
parent 0237409d27
commit 6e3d0f9787
9 changed files with 53 additions and 50 deletions

View File

@ -82,7 +82,8 @@ class _AccountScreenState extends State<AccountScreen> {
return CenteredContainer(
child: ListView(
children: [
const AccountHeading().paddingOnly(bottom: 8, top: 8),
if (auth.userProfile.value != null)
const AccountHeading().paddingOnly(bottom: 8, top: 8),
...(actionItems.map(
(x) => ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 34),
@ -134,7 +135,7 @@ class _AccountHeadingState extends State<AccountHeading> {
final AuthProvider auth = Get.find();
final prof = auth.userProfile.value!;
return AccountHeadingWidget(
avatar: prof['avatar'],
banner: prof['banner'],

View File

@ -25,9 +25,8 @@ class _HomeScreenState extends State<HomeScreen>
@override
void initState() {
Get.lazyPut(() => PostListController());
super.initState();
_postController = Get.find();
_postController = PostListController();
_tabController = TabController(length: 2, vsync: this);
_tabController.addListener(() {
switch (_tabController.index) {
@ -97,7 +96,8 @@ class _HomeScreenState extends State<HomeScreen>
onRefresh: () => _postController.reloadAllOver(),
child: CustomScrollView(slivers: [
FeedListWidget(
controller: _postController.pagingController),
controller: _postController.pagingController,
),
]),
),
PostShuffleSwiper(controller: _postController),