minor fixes
This commit is contained in:
parent
220342f9bc
commit
b7a4da17d8
3 changed files with 13 additions and 5 deletions
|
@ -22,8 +22,8 @@ class QueryFilter extends CollectionFilter {
|
||||||
QueryFilter(this.query, {this.colorful = true, this.live = false}) {
|
QueryFilter(this.query, {this.colorful = true, this.live = false}) {
|
||||||
var upQuery = query.toUpperCase();
|
var upQuery = query.toUpperCase();
|
||||||
if (upQuery.startsWith('ID:')) {
|
if (upQuery.startsWith('ID:')) {
|
||||||
final id = int.tryParse(upQuery.substring(3));
|
final contentId = int.tryParse(upQuery.substring(3));
|
||||||
_test = (entry) => entry.id == id;
|
_test = (entry) => entry.contentId == contentId;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,14 @@ class _AvesAppState extends State<AvesApp> with WidgetsBindingObserver {
|
||||||
if (!settings.initialized) return;
|
if (!settings.initialized) return;
|
||||||
|
|
||||||
final stopwatch = Stopwatch()..start();
|
final stopwatch = Stopwatch()..start();
|
||||||
final screenSize = window.physicalSize / window.devicePixelRatio;
|
final Size screenSize;
|
||||||
|
try {
|
||||||
|
screenSize = window.physicalSize / window.devicePixelRatio;
|
||||||
|
} catch (error) {
|
||||||
|
// view may no longer be usable
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var tileExtent = settings.getTileExtent(CollectionPage.routeName);
|
var tileExtent = settings.getTileExtent(CollectionPage.routeName);
|
||||||
if (tileExtent == 0) {
|
if (tileExtent == 0) {
|
||||||
tileExtent = screenSize.shortestSide / CollectionGrid.columnCountDefault;
|
tileExtent = screenSize.shortestSide / CollectionGrid.columnCountDefault;
|
||||||
|
|
|
@ -305,12 +305,13 @@ class _FeedbackMessageState extends State<_FeedbackMessage> with SingleTickerPro
|
||||||
if (start != null && stop != null) {
|
if (start != null && stop != null) {
|
||||||
_totalDurationMillis = stop.difference(start).inMilliseconds;
|
_totalDurationMillis = stop.difference(start).inMilliseconds;
|
||||||
final remainingDuration = stop.difference(DateTime.now());
|
final remainingDuration = stop.difference(DateTime.now());
|
||||||
|
final effectiveDuration = remainingDuration > Duration.zero ? remainingDuration : const Duration(milliseconds: 1);
|
||||||
_animationController = AnimationController(
|
_animationController = AnimationController(
|
||||||
duration: remainingDuration,
|
duration: effectiveDuration,
|
||||||
vsync: this,
|
vsync: this,
|
||||||
);
|
);
|
||||||
_remainingDurationMillis = IntTween(
|
_remainingDurationMillis = IntTween(
|
||||||
begin: remainingDuration.inMilliseconds,
|
begin: effectiveDuration.inMilliseconds,
|
||||||
end: 0,
|
end: 0,
|
||||||
).animate(CurvedAnimation(
|
).animate(CurvedAnimation(
|
||||||
parent: _animationController!,
|
parent: _animationController!,
|
||||||
|
|
Loading…
Reference in a new issue