fix: when no friends, dummy UI still shows giving the user a false hope of friendship :'(

This commit is contained in:
Kingkor Roy Tirtho 2024-01-23 22:43:36 +06:00
parent 8c6c6a96b1
commit fea228292a
2 changed files with 5 additions and 4 deletions

View File

@ -48,9 +48,8 @@ class HomePageFriendsSection extends HookConsumerWidget {
},
);
if (friendsQuery.hasData &&
friendsQuery.data?.friends.isEmpty == true &&
!friendsQuery.isLoading) {
if (!friendsQuery.isLoading &&
(!friendsQuery.hasData || friendsQuery.data!.friends.isEmpty)) {
return const SliverToBoxAdapter(
child: SizedBox.shrink(),
);

View File

@ -228,7 +228,9 @@ class SpotubeState extends ConsumerState<Spotube> {
builder: (context, child) {
return DevicePreview.appBuilder(
context,
DragToResizeArea(child: child!),
DesktopTools.platform.isDesktop
? DragToResizeArea(child: child!)
: child,
);
},
themeMode: themeMode,