refactor: Avoid unnecessary bool comparison

This commit is contained in:
Christian Kußowski 2026-02-19 08:53:18 +01:00
commit 1cd3a91037
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
15 changed files with 26 additions and 25 deletions

View file

@ -110,7 +110,7 @@ class ImageViewerController extends State<ImageViewer> {
/// Go back if user swiped it away
void onInteractionEnds(ScaleEndDetails endDetails) {
if (PlatformInfos.usesTouchscreen == false) {
if (!PlatformInfos.usesTouchscreen) {
if (endDetails.velocity.pixelsPerSecond.dy >
MediaQuery.sizeOf(context).height * maxScaleFactor) {
Navigator.of(context, rootNavigator: false).pop();

View file

@ -73,7 +73,7 @@ class EventVideoPlayerState extends State<EventVideoPlayer> {
widget.event.attachmentOrThumbnailMxcUrl()!.pathSegments.last,
);
final file = File('${tempDir.path}/${fileName}_${videoFile.name}');
if (await file.exists() == false) {
if (!await file.exists()) {
await file.writeAsBytes(videoFile.bytes);
}
videoPlayerController = VideoPlayerController.file(file);