mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 12:38:24 +00:00
Fix display bugs in search screen
This commit is contained in:
@@ -392,25 +392,13 @@ class StackCard extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Builder(
|
||||
builder: (context) {
|
||||
final titleStyle = context.textTheme.titleMedium?.copyWith(
|
||||
fontFamily: 'Inter',
|
||||
fontSize:
|
||||
(context.textTheme.titleMedium?.fontSize ?? 16) * 0.9,
|
||||
);
|
||||
final lineHeight =
|
||||
(titleStyle?.fontSize ?? 14.4) *
|
||||
(titleStyle?.height ?? 1.2);
|
||||
return SizedBox(
|
||||
height: lineHeight * 2,
|
||||
child: _FadingText(
|
||||
stack.name ?? stack.identifier,
|
||||
style: titleStyle,
|
||||
maxLines: 2,
|
||||
),
|
||||
);
|
||||
},
|
||||
_FadingText(
|
||||
stack.name ?? stack.identifier,
|
||||
style: context.textTheme.titleMedium?.copyWith(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: (context.textTheme.titleMedium?.fontSize ?? 16) * 0.9,
|
||||
),
|
||||
maxLines: 2,
|
||||
),
|
||||
if (showAuthor) ...[
|
||||
const SizedBox(height: 6),
|
||||
|
||||
@@ -271,6 +271,18 @@ class LatestReleasesContainer extends HookConsumerWidget {
|
||||
}
|
||||
}
|
||||
|
||||
void checkInitialLoad() {
|
||||
if (!scrollController.hasClients) return;
|
||||
final position = scrollController.position;
|
||||
final s = ref.read(latestReleasesProvider);
|
||||
if (s.isLoadingMore || !s.hasMore) return;
|
||||
if (position.maxScrollExtent <= position.viewportDimension) {
|
||||
ref.read(latestReleasesProvider.notifier).loadMore();
|
||||
}
|
||||
}
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => checkInitialLoad());
|
||||
|
||||
scrollController.addListener(onScroll);
|
||||
return () => scrollController.removeListener(onScroll);
|
||||
}, [scrollController, state]);
|
||||
|
||||
Reference in New Issue
Block a user