perf: optimize post tags scrolling performance and eliminate frame drops (v3.1.2)
Build and Release / Build Windows x64 (push) Has been cancelled
Build and Release / Build Windows x64 (push) Has been cancelled
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/RarDog/Lunaris/releases"><img src="https://img.shields.io/badge/Version-3.1.1-8A2BE2?style=for-the-badge&logo=semver&logoColor=white" alt="Version 3.1.1" /></a>
|
<a href="https://github.com/RarDog/Lunaris/releases"><img src="https://img.shields.io/badge/Version-3.1.2-8A2BE2?style=for-the-badge&logo=semver&logoColor=white" alt="Version 3.1.2" /></a>
|
||||||
<img src="https://img.shields.io/badge/Flutter-3.47+-02569B?style=for-the-badge&logo=flutter&logoColor=white" alt="Flutter" />
|
<img src="https://img.shields.io/badge/Flutter-3.47+-02569B?style=for-the-badge&logo=flutter&logoColor=white" alt="Flutter" />
|
||||||
<img src="https://img.shields.io/badge/Platform-Android%20%7C%20Linux%20%7C%20Windows-00C853?style=for-the-badge" alt="Platforms" />
|
<img src="https://img.shields.io/badge/Platform-Android%20%7C%20Linux%20%7C%20Windows-00C853?style=for-the-badge" alt="Platforms" />
|
||||||
<a href="https://github.com/RarDog/Lunaris/wiki"><img src="https://img.shields.io/badge/Wiki-Documentation-FF6F00?style=for-the-badge&logo=gitbook&logoColor=white" alt="Wiki" /></a>
|
<a href="https://github.com/RarDog/Lunaris/wiki"><img src="https://img.shields.io/badge/Wiki-Documentation-FF6F00?style=for-the-badge&logo=gitbook&logoColor=white" alt="Wiki" /></a>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
const appDisplayVersion = '3.1.1';
|
const appDisplayVersion = '3.1.2';
|
||||||
const appBuildNumber = 62;
|
const appBuildNumber = 63;
|
||||||
const appReleaseChannel = 'Stable';
|
const appReleaseChannel = 'Stable';
|
||||||
|
|||||||
@@ -1,4 +1,14 @@
|
|||||||
const lunarisChangelog = [
|
const lunarisChangelog = [
|
||||||
|
LunarisChange(
|
||||||
|
version: '3.1.2',
|
||||||
|
title: 'Оптимизация производительности: устранение лагов при скролле к тегам',
|
||||||
|
bullets: [
|
||||||
|
'Устранение лагов при прокрутке тегов: полностью ликвидирован тяжелый GPU-оверхед BackdropFilter на повторяющихся чипах тегов, вызывавший просадки FPS и микрофризы при скролле постов с десятками и сотнями тегов.',
|
||||||
|
'Высокопроизводительный стеклянный стиль чипов (TagChip): чипы переведены на эффективные аппаратные альфа-слои и зеркальные контуры без потери премиального неонового Liquid Glass вида и цветных индикаторов категорий.',
|
||||||
|
'Облегчение контейнеров блока тегов: на мобильных и десктоп экранах контейнеры тегов оптимизированы для мгновенного плавного 120 FPS скроллинга.',
|
||||||
|
'Интеллектуальный лимит начального отображения: оптимизировано первоначальное количество отображаемых тегов в огромных категориях с удобной кнопкой быстрого раскрытия.',
|
||||||
|
],
|
||||||
|
),
|
||||||
LunarisChange(
|
LunarisChange(
|
||||||
version: '3.1.1',
|
version: '3.1.1',
|
||||||
title: 'Деление тегов по стилю e621/Gelbooru/Rule34 и исправление поиска тегов со скобками',
|
title: 'Деление тегов по стилю e621/Gelbooru/Rule34 и исправление поиска тегов со скобками',
|
||||||
|
|||||||
@@ -314,49 +314,43 @@ class PostDetailsScreen extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
ClipRRect(
|
Container(
|
||||||
borderRadius: BorderRadius.circular(20),
|
decoration: BoxDecoration(
|
||||||
child: BackdropFilter(
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
filter: ImageFilter.blur(sigmaX: 16, sigmaY: 16),
|
? Theme.of(context).colorScheme.surfaceContainerHigh.withValues(alpha: 0.70)
|
||||||
child: Container(
|
: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||||
decoration: BoxDecoration(
|
borderRadius: BorderRadius.circular(20),
|
||||||
color: Theme.of(context).brightness == Brightness.dark
|
border: Border.all(
|
||||||
? Theme.of(context).colorScheme.surfaceContainerHigh.withValues(alpha: 0.55)
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
: Colors.white.withValues(alpha: 0.85),
|
? Colors.white.withValues(alpha: 0.12)
|
||||||
borderRadius: BorderRadius.circular(20),
|
: Theme.of(context).colorScheme.outlineVariant.withValues(alpha: 0.40),
|
||||||
border: Border.all(
|
width: 1.1,
|
||||||
color: Theme.of(context).brightness == Brightness.dark
|
),
|
||||||
? Colors.white.withValues(alpha: 0.12)
|
),
|
||||||
: Colors.white.withValues(alpha: 0.8),
|
padding: const EdgeInsets.all(16),
|
||||||
width: 1.1,
|
child: Column(
|
||||||
),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
),
|
children: [
|
||||||
padding: const EdgeInsets.all(16),
|
Row(
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Icon(
|
||||||
children: [
|
Icons.tag_rounded,
|
||||||
Icon(
|
size: 20,
|
||||||
Icons.tag_rounded,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
size: 20,
|
),
|
||||||
color: Theme.of(context).colorScheme.primary,
|
const SizedBox(width: 8),
|
||||||
),
|
Text(
|
||||||
const SizedBox(width: 8),
|
'${strings.tags} (${post.cleanTags.length})',
|
||||||
Text(
|
style: Theme.of(context)
|
||||||
'${strings.tags} (${post.cleanTags.length})',
|
.textTheme
|
||||||
style: Theme.of(context)
|
.titleMedium
|
||||||
.textTheme
|
?.copyWith(fontWeight: FontWeight.bold),
|
||||||
.titleMedium
|
|
||||||
?.copyWith(fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
|
||||||
PostTagsPanel(post: post),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 12),
|
||||||
|
PostTagsPanel(post: post),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
@@ -498,49 +492,44 @@ class PostDetailsScreen extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
ClipRRect(
|
Container(
|
||||||
borderRadius: BorderRadius.circular(20),
|
decoration: BoxDecoration(
|
||||||
child: BackdropFilter(
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
filter: ImageFilter.blur(sigmaX: 16, sigmaY: 16),
|
? Theme.of(context).colorScheme.surfaceContainerHigh.withValues(alpha: 0.70)
|
||||||
child: Container(
|
: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||||
decoration: BoxDecoration(
|
borderRadius: BorderRadius.circular(20),
|
||||||
color: Theme.of(context).brightness == Brightness.dark
|
border: Border.all(
|
||||||
? Theme.of(context).colorScheme.surfaceContainerHigh.withValues(alpha: 0.55)
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
: Colors.white.withValues(alpha: 0.85),
|
? Colors.white.withValues(alpha: 0.12)
|
||||||
borderRadius: BorderRadius.circular(20),
|
: Theme.of(context).colorScheme.outlineVariant.withValues(alpha: 0.40),
|
||||||
border: Border.all(
|
width: 1.1,
|
||||||
color: Theme.of(context).brightness == Brightness.dark
|
|
||||||
? Colors.white.withValues(alpha: 0.12)
|
|
||||||
: Colors.white.withValues(alpha: 0.8),
|
|
||||||
width: 1.1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: ExpansionTile(
|
|
||||||
tilePadding:
|
|
||||||
const EdgeInsets.symmetric(horizontal: 14, vertical: 2),
|
|
||||||
childrenPadding: const EdgeInsets.fromLTRB(14, 0, 14, 14),
|
|
||||||
initiallyExpanded: false,
|
|
||||||
shape: const Border(),
|
|
||||||
collapsedShape: const Border(),
|
|
||||||
leading: Icon(
|
|
||||||
Icons.tag_rounded,
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
),
|
|
||||||
title: Text(
|
|
||||||
'${strings.tags} (${post.cleanTags.length})',
|
|
||||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: PostTagsPanel(post: post),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: ExpansionTile(
|
||||||
|
tilePadding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 14, vertical: 2),
|
||||||
|
childrenPadding: const EdgeInsets.fromLTRB(14, 0, 14, 14),
|
||||||
|
initiallyExpanded: false,
|
||||||
|
shape: const Border(),
|
||||||
|
collapsedShape: const Border(),
|
||||||
|
leading: Icon(
|
||||||
|
Icons.tag_rounded,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
'${strings.tags} (${post.cleanTags.length})',
|
||||||
|
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: PostTagsPanel(post: post),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_CommentsSection(post: post),
|
_CommentsSection(post: post),
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ class _TagGroupBlock extends StatelessWidget {
|
|||||||
required this.onLongPress,
|
required this.onLongPress,
|
||||||
});
|
});
|
||||||
|
|
||||||
static const _collapsedLimit = 36;
|
static const _collapsedLimit = 28;
|
||||||
|
|
||||||
final String label;
|
final String label;
|
||||||
final String group;
|
final String group;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'dart:ui';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../backend/models/tag_suggestion.dart';
|
import '../../backend/models/tag_suggestion.dart';
|
||||||
@@ -41,57 +40,44 @@ class TagChip extends StatelessWidget {
|
|||||||
|
|
||||||
final (Color baseColor, Color textColor) = _colorsForCategory(cat, scheme, isDark);
|
final (Color baseColor, Color textColor) = _colorsForCategory(cat, scheme, isDark);
|
||||||
|
|
||||||
final chipWidget = ClipRRect(
|
final chipWidget = Container(
|
||||||
borderRadius: BorderRadius.circular(10),
|
decoration: BoxDecoration(
|
||||||
child: BackdropFilter(
|
color: baseColor.withValues(alpha: isDark ? 0.16 : 0.10),
|
||||||
filter: ImageFilter.blur(sigmaX: 8, sigmaY: 8),
|
borderRadius: BorderRadius.circular(10),
|
||||||
child: Container(
|
border: Border.all(
|
||||||
decoration: BoxDecoration(
|
color: baseColor.withValues(alpha: isDark ? 0.40 : 0.28),
|
||||||
color: baseColor.withValues(alpha: isDark ? 0.18 : 0.12),
|
width: 1.0,
|
||||||
borderRadius: BorderRadius.circular(10),
|
),
|
||||||
border: Border.all(
|
),
|
||||||
color: baseColor.withValues(alpha: isDark ? 0.45 : 0.32),
|
child: Material(
|
||||||
width: 1.0,
|
color: Colors.transparent,
|
||||||
),
|
child: InkWell(
|
||||||
),
|
borderRadius: BorderRadius.circular(10),
|
||||||
child: Material(
|
onTap: onTap,
|
||||||
color: Colors.transparent,
|
child: Padding(
|
||||||
child: InkWell(
|
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||||
borderRadius: BorderRadius.circular(10),
|
child: Row(
|
||||||
onTap: onTap,
|
mainAxisSize: MainAxisSize.min,
|
||||||
child: Padding(
|
children: [
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
Container(
|
||||||
child: Row(
|
width: 6,
|
||||||
mainAxisSize: MainAxisSize.min,
|
height: 6,
|
||||||
children: [
|
margin: const EdgeInsets.only(right: 6),
|
||||||
Container(
|
decoration: BoxDecoration(
|
||||||
width: 6,
|
color: baseColor,
|
||||||
height: 6,
|
shape: BoxShape.circle,
|
||||||
margin: const EdgeInsets.only(right: 6),
|
),
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: baseColor,
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: baseColor.withValues(alpha: 0.6),
|
|
||||||
blurRadius: 4,
|
|
||||||
spreadRadius: 1,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
tag,
|
|
||||||
style: TextStyle(
|
|
||||||
color: textColor,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 13,
|
|
||||||
letterSpacing: -0.1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
Text(
|
||||||
|
tag,
|
||||||
|
style: TextStyle(
|
||||||
|
color: textColor,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
fontSize: 13,
|
||||||
|
letterSpacing: -0.1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
name: gel_rule_app
|
name: gel_rule_app
|
||||||
description: Local backend/core layer for a Flutter booru browser app.
|
description: Local backend/core layer for a Flutter booru browser app.
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
version: 3.1.1+62
|
version: 3.1.2+63
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.3.0 <4.0.0"
|
sdk: ">=3.3.0 <4.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user