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}) {
|
||||
var upQuery = query.toUpperCase();
|
||||
if (upQuery.startsWith('ID:')) {
|
||||
final id = int.tryParse(upQuery.substring(3));
|
||||
_test = (entry) => entry.id == id;
|
||||
final contentId = int.tryParse(upQuery.substring(3));
|
||||
_test = (entry) => entry.contentId == contentId;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -245,7 +245,14 @@ class _AvesAppState extends State<AvesApp> with WidgetsBindingObserver {
|
|||
if (!settings.initialized) return;
|
||||
|
||||
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);
|
||||
if (tileExtent == 0) {
|
||||
tileExtent = screenSize.shortestSide / CollectionGrid.columnCountDefault;
|
||||
|
|
|
@ -305,12 +305,13 @@ class _FeedbackMessageState extends State<_FeedbackMessage> with SingleTickerPro
|
|||
if (start != null && stop != null) {
|
||||
_totalDurationMillis = stop.difference(start).inMilliseconds;
|
||||
final remainingDuration = stop.difference(DateTime.now());
|
||||
final effectiveDuration = remainingDuration > Duration.zero ? remainingDuration : const Duration(milliseconds: 1);
|
||||
_animationController = AnimationController(
|
||||
duration: remainingDuration,
|
||||
duration: effectiveDuration,
|
||||
vsync: this,
|
||||
);
|
||||
_remainingDurationMillis = IntTween(
|
||||
begin: remainingDuration.inMilliseconds,
|
||||
begin: effectiveDuration.inMilliseconds,
|
||||
end: 0,
|
||||
).animate(CurvedAnimation(
|
||||
parent: _animationController!,
|
||||
|
|
Loading…
Reference in a new issue