fluffychat merge - resolve conflicts

This commit is contained in:
ggurdin 2024-09-04 14:43:45 -04:00
commit 7bf3a9ab94
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
9 changed files with 65 additions and 40 deletions

View file

@ -156,8 +156,8 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.3.3)
strscan
rouge (2.0.7)
ruby2_keywords (0.0.4)
rubyzip (2.3.0)

View file

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '13.0'
platform :ios, '12.1'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

View file

@ -475,7 +475,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -568,7 +568,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -617,7 +617,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;

View file

@ -9,6 +9,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:just_audio/just_audio.dart';
import 'package:matrix/matrix.dart';
import 'package:opus_caf_converter_dart/opus_caf_converter_dart.dart';
import 'package:path_provider/path_provider.dart';
import '../../../utils/matrix_sdk_extensions/event_extension.dart';
@ -95,7 +96,18 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
// Pangea#
);
file = File('${tempDir.path}/${fileName}_${matrixFile.name}');
await file.writeAsBytes(matrixFile.bytes);
if (Platform.isIOS &&
matrixFile.mimeType.toLowerCase() == 'audio/ogg') {
Logs().v('Convert ogg audio file for iOS...');
final convertedFile = File('${file.path}.caf');
if (await convertedFile.exists() == false) {
OpusCaf().convertOpusToCaf(file.path, convertedFile.path);
}
file = convertedFile;
}
}
setState(() {

View file

@ -16,7 +16,6 @@ import 'package:wakelock_plus/wakelock_plus.dart';
import 'events/audio_player.dart';
class RecordingDialog extends StatefulWidget {
static const String recordingFileType = 'wav';
const RecordingDialog({
super.key,
});
@ -44,12 +43,15 @@ class RecordingDialogState extends State<RecordingDialog> {
try {
// #Pangea
// enable recording on web
// final useOpus =
// await _audioRecorder.isEncoderSupported(AudioEncoder.opus);
// final tempDir = await getTemporaryDirectory();
// final path = _recordedPath =
// '${tempDir.path}/recording${DateTime.now().microsecondsSinceEpoch}.${RecordingDialog.recordingFileType}';
final tempDirPath = kIsWeb ? "." : (await getTemporaryDirectory()).path;
_recordedPath =
'$tempDirPath/recording${DateTime.now().microsecondsSinceEpoch}.${RecordingDialog.recordingFileType}';
// '${tempDir.path}/recording${DateTime.now().microsecondsSinceEpoch}.${useOpus ? 'ogg' : 'm4a'}';
final tempDir = kIsWeb ? "." : (await getTemporaryDirectory()).path;
final path = _recordedPath =
'$tempDir/recording${DateTime.now().microsecondsSinceEpoch}.wav';
// Pangea#
final result = await _audioRecorder.hasPermission();
@ -59,7 +61,7 @@ class RecordingDialogState extends State<RecordingDialog> {
}
await WakelockPlus.enable();
// #Pangea
final bool isNotError = await showUpdateVersionDialog(
final isNotError = await showUpdateVersionDialog(
future: () =>
// Pangea#
_audioRecorder.start(

View file

@ -10,39 +10,40 @@ abstract class UpdateNotifier {
final scaffoldMessenger = ScaffoldMessenger.of(context);
final currentVersion = await PlatformInfos.getVersion();
final store = await SharedPreferences.getInstance();
// final storedVersion = store.getString(versionStoreKey);
const storedVersion = "0.0.0";
final storedVersion = store.getString(versionStoreKey);
if (currentVersion != storedVersion) {
ScaffoldFeatureController? controller;
controller = scaffoldMessenger.showSnackBar(
SnackBar(
duration: const Duration(seconds: 30),
content: Row(
children: [
IconButton(
icon: Icon(
Icons.close_outlined,
size: 20,
color: Theme.of(context).colorScheme.onPrimary,
if (storedVersion != null) {
ScaffoldFeatureController? controller;
controller = scaffoldMessenger.showSnackBar(
SnackBar(
duration: const Duration(seconds: 30),
content: Row(
children: [
IconButton(
icon: Icon(
Icons.close_outlined,
size: 20,
color: Theme.of(context).colorScheme.onPrimary,
),
onPressed: () => controller?.close(),
),
onPressed: () => controller?.close(),
),
Expanded(
child: Text(
L10n.of(context)!.updateInstalled(currentVersion),
Expanded(
child: Text(
L10n.of(context)!.updateInstalled(currentVersion),
),
),
),
],
],
),
// #Pangea
// action: SnackBarAction(
// label: L10n.of(context)!.changelog,
// onPressed: () => launchUrlString(AppConfig.changelogUrl),
// ),
// Pangea#
),
// #Pangea
// action: SnackBarAction(
// label: L10n.of(context)!.changelog,
// onPressed: () => launchUrlString(AppConfig.changelogUrl),
// ),
// Pangea#
),
);
);
}
await store.setString(versionStoreKey, currentVersion);
}
}

View file

@ -12,6 +12,7 @@ permittedLicenses:
- BSD-2-Clause
- BSD-3-Clause
- EUPL-1.2
- LGPL-3.0
- MIT
- MPL-2.0
- Zlib

View file

@ -1510,6 +1510,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.3.2"
opus_caf_converter_dart:
dependency: "direct main"
description:
name: opus_caf_converter_dart
sha256: e08156066916f790a54df305e103d6dec4d853ec23147e6a02eda3c06f67ba1a
url: "https://pub.dev"
source: hosted
version: "1.0.1"
package_config:
dependency: transitive
description:

View file

@ -78,6 +78,7 @@ dependencies:
# matrix: ^0.31.0
# Pangea#
native_imaging: ^0.1.1
opus_caf_converter_dart: ^1.0.1
package_info_plus: ^6.0.0
pasteboard: ^0.2.0
path: ^1.9.0