1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Generate video thumbnails

This commit is contained in:
2021-03-12 19:36:42 +01:00
parent 8f7ca14586
commit b84eba59e3
10 changed files with 100 additions and 12 deletions

View File

@ -11,15 +11,19 @@ class NewConversationMessage {
final int conversationID;
final String message;
final BytesFile file;
final BytesFile thumbnail;
NewConversationMessage({
@required this.conversationID,
@required this.message,
this.file,
this.thumbnail,
}) : assert(conversationID != null),
assert(file != null || message != null);
bool get hasMessage => message != null;
bool get hasFile => file != null;
bool get hasThumbnail => thumbnail != null;
}

View File

@ -64,6 +64,10 @@ class ConversationsPolicy {
final int filesMaxSize;
final int writingEventInterval;
final int writingEventLifetime;
final int maxMessageImageWidth;
final int maxMessageImageHeight;
final int maxThumbnailWidth;
final int maxThumbnailHeight;
const ConversationsPolicy({
@required this.minMessageLen,
@ -72,12 +76,20 @@ class ConversationsPolicy {
@required this.filesMaxSize,
@required this.writingEventInterval,
@required this.writingEventLifetime,
@required this.maxMessageImageWidth,
@required this.maxMessageImageHeight,
@required this.maxThumbnailWidth,
@required this.maxThumbnailHeight,
}) : assert(minMessageLen != null),
assert(maxMessageLen != null),
assert(allowedFilesType != null),
assert(filesMaxSize != null),
assert(writingEventInterval != null),
assert(writingEventLifetime != null);
assert(writingEventLifetime != null),
assert(maxMessageImageWidth != null),
assert(maxMessageImageHeight != null),
assert(maxThumbnailWidth != null),
assert(maxThumbnailHeight != null);
}
class ServerConfig {