Skip to content

Commit

Permalink
Merge pull request #52 from Metatavu/develop
Browse files Browse the repository at this point in the history
Production update 6.5.2024
  • Loading branch information
anttileppa committed May 6, 2024
2 parents 46642cf + c3b8965 commit 8c418b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/screens/page_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class PageScreenState extends NohevaScreenState<PageScreen> {
return Directionality(
textDirection: TextDirection.ltr,
child: Scaffold(
backgroundColor: const Color(0xffffffff),
backgroundColor: const Color(0xff000000),
body: DeferredPointerHandler(
child: Container(
width: screenSize.width,
Expand Down
10 changes: 6 additions & 4 deletions lib/utils/offline_file_controller.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "dart:async";
import "dart:convert";
import "dart:io";
import "dart:typed_data";
import "package:crypto/crypto.dart";
import "package:path_provider/path_provider.dart";
import "package:path/path.dart" as p;
Expand Down Expand Up @@ -177,18 +178,19 @@ class OfflineFileController {
File newFile = await filePart.rename(newFileName);

String extension = fileName.substring(fileName.lastIndexOf("."));
File? videoThumbnail;
Uint8List? videoThumbnail;
File? existingVideoThumbnailFileName =
File(newFileName.replaceAll(extension, ".thumbnail.jpg"));

if (extension == ".mp4") {
videoThumbnail =
await VideoCompress.getFileThumbnail(newFile.absolute.path);
await VideoCompress.getByteThumbnail(newFile.absolute.path);
}
if (videoThumbnail != null &&
!await existingVideoThumbnailFileName.exists()) {
await videoThumbnail
.rename(newFileName.replaceAll(extension, ".thumbnail.jpg"));
File videoThumbnailFile =
File(newFileName.replaceAll(extension, ".thumbnail.jpg"));
await videoThumbnailFile.writeAsBytes(videoThumbnail);
}
await _writeMetaFile(existingFile, eTag);
SimpleLogger().info("Downloaded $newFileName!");
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Noheva visitor UI project

publish_to: "none" # Remove this line if you wish to publish to pub.dev

version: 0.1.18
version: 0.1.19-develop.0

environment:
sdk: ">=3.0.6 <4.0.0"
Expand Down

0 comments on commit 8c418b8

Please sign in to comment.