mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:08:40 +00:00
workaround for #329
This commit is contained in:
parent
6ab11c4e69
commit
24edf896c5
3 changed files with 11 additions and 0 deletions
|
|
@ -31,6 +31,9 @@ class UserData {
|
||||||
@JsonKey(defaultValue: false)
|
@JsonKey(defaultValue: false)
|
||||||
bool isDeveloper = false;
|
bool isDeveloper = false;
|
||||||
|
|
||||||
|
@JsonKey(defaultValue: false)
|
||||||
|
bool disableVideoCompression = false;
|
||||||
|
|
||||||
@JsonKey(defaultValue: 0)
|
@JsonKey(defaultValue: 0)
|
||||||
int deviceId = 0;
|
int deviceId = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) => UserData(
|
||||||
..appVersion = (json['appVersion'] as num?)?.toInt() ?? 0
|
..appVersion = (json['appVersion'] as num?)?.toInt() ?? 0
|
||||||
..avatarCounter = (json['avatarCounter'] as num?)?.toInt() ?? 0
|
..avatarCounter = (json['avatarCounter'] as num?)?.toInt() ?? 0
|
||||||
..isDeveloper = json['isDeveloper'] as bool? ?? false
|
..isDeveloper = json['isDeveloper'] as bool? ?? false
|
||||||
|
..disableVideoCompression =
|
||||||
|
json['disableVideoCompression'] as bool? ?? false
|
||||||
..deviceId = (json['deviceId'] as num?)?.toInt() ?? 0
|
..deviceId = (json['deviceId'] as num?)?.toInt() ?? 0
|
||||||
..lastImageSend = json['lastImageSend'] == null
|
..lastImageSend = json['lastImageSend'] == null
|
||||||
? null
|
? null
|
||||||
|
|
@ -79,6 +81,7 @@ Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
|
||||||
'appVersion': instance.appVersion,
|
'appVersion': instance.appVersion,
|
||||||
'avatarCounter': instance.avatarCounter,
|
'avatarCounter': instance.avatarCounter,
|
||||||
'isDeveloper': instance.isDeveloper,
|
'isDeveloper': instance.isDeveloper,
|
||||||
|
'disableVideoCompression': instance.disableVideoCompression,
|
||||||
'deviceId': instance.deviceId,
|
'deviceId': instance.deviceId,
|
||||||
'subscriptionPlan': instance.subscriptionPlan,
|
'subscriptionPlan': instance.subscriptionPlan,
|
||||||
'lastImageSend': instance.lastImageSend?.toIso8601String(),
|
'lastImageSend': instance.lastImageSend?.toIso8601String(),
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,11 @@ Future<void> compressAndOverlayVideo(MediaFileService media) async {
|
||||||
media.ffmpegOutputPath.deleteSync();
|
media.ffmpegOutputPath.deleteSync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gUser.disableVideoCompression) {
|
||||||
|
media.originalPath.copySync(media.tempPath.path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var overLayCommand = '';
|
var overLayCommand = '';
|
||||||
if (media.overlayImagePath.existsSync()) {
|
if (media.overlayImagePath.existsSync()) {
|
||||||
overLayCommand =
|
overLayCommand =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue