viewer: improved handling of negative size

This commit is contained in:
Thibault Deckers 2021-02-21 11:20:36 +09:00
parent 2d50465ce6
commit dc287e8667

View file

@ -126,15 +126,15 @@ class _EntryPageViewState extends State<EntryPageView> {
animation: entry.imageChangeNotifier, animation: entry.imageChangeNotifier,
builder: (context, child) { builder: (context, child) {
Widget child; Widget child;
if (entry.isVideo) { if (entry.isSvg) {
if (!entry.displaySize.isEmpty) {
child = _buildVideoView();
}
} else if (entry.isSvg) {
child = _buildSvgView(); child = _buildSvgView();
} else if (!entry.displaySize.isEmpty) {
if (entry.isVideo) {
child = _buildVideoView();
} else if (entry.canDecode) { } else if (entry.canDecode) {
child = _buildRasterView(); child = _buildRasterView();
} }
}
child ??= ErrorView( child ??= ErrorView(
entry: entry, entry: entry,
onTap: () => onTap?.call(null), onTap: () => onTap?.call(null),