fluffychat merge
This commit is contained in:
commit
6d3bb87bf6
11 changed files with 45 additions and 33 deletions
|
|
@ -795,7 +795,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
}
|
||||
|
||||
// #Pangea
|
||||
// if (await Record().hasPermission() == false) return;
|
||||
// if (await AudioRecorder().hasPermission() == false) return;
|
||||
// Pangea#
|
||||
final result = await showDialog<RecordingResult>(
|
||||
context: context,
|
||||
|
|
|
|||
|
|
@ -175,7 +175,8 @@ class ChatView extends StatelessWidget {
|
|||
}
|
||||
},
|
||||
child: StreamBuilder(
|
||||
stream: controller.room.onUpdate.stream
|
||||
stream: controller.room.client.onRoomState.stream
|
||||
.where((update) => update.roomId == controller.room.id)
|
||||
.rateLimit(const Duration(seconds: 1)),
|
||||
builder: (context, snapshot) => FutureBuilder(
|
||||
future: controller.loadTimelineFuture,
|
||||
|
|
|
|||
|
|
@ -61,13 +61,13 @@ class Message extends StatelessWidget {
|
|||
this.highlightMarker = false,
|
||||
this.animateIn = false,
|
||||
this.resetAnimateIn,
|
||||
this.avatarPresenceBackgroundColor,
|
||||
// #Pangea
|
||||
required this.selectedDisplayLang,
|
||||
required this.immersionMode,
|
||||
required this.definitions,
|
||||
required this.controller,
|
||||
// Pangea#
|
||||
this.avatarPresenceBackgroundColor,
|
||||
super.key,
|
||||
});
|
||||
|
||||
|
|
@ -315,6 +315,12 @@ class Message extends StatelessWidget {
|
|||
alignment: alignment,
|
||||
padding: const EdgeInsets.only(left: 8),
|
||||
child: GestureDetector(
|
||||
// #Pangea
|
||||
onTap: () =>
|
||||
toolbarController?.showToolbar(context),
|
||||
onDoubleTap: () =>
|
||||
toolbarController?.showToolbar(context),
|
||||
// Pangea#
|
||||
onLongPress: longPressSelect
|
||||
? null
|
||||
: () {
|
||||
|
|
@ -432,8 +438,7 @@ class Message extends StatelessWidget {
|
|||
// #Pangea
|
||||
selected: selected,
|
||||
pangeaMessageEvent:
|
||||
toolbarController
|
||||
?.pangeaMessageEvent,
|
||||
pangeaMessageEvent,
|
||||
immersionMode: immersionMode,
|
||||
toolbarController:
|
||||
toolbarController,
|
||||
|
|
@ -445,9 +450,8 @@ class Message extends StatelessWidget {
|
|||
)
|
||||
// #Pangea
|
||||
||
|
||||
(toolbarController
|
||||
?.pangeaMessageEvent
|
||||
.showUseType ??
|
||||
(pangeaMessageEvent
|
||||
?.showUseType ??
|
||||
false)
|
||||
// Pangea#
|
||||
)
|
||||
|
|
@ -461,12 +465,10 @@ class Message extends StatelessWidget {
|
|||
MainAxisSize.min,
|
||||
children: [
|
||||
// #Pangea
|
||||
if (toolbarController
|
||||
?.pangeaMessageEvent
|
||||
.showUseType ??
|
||||
if (pangeaMessageEvent
|
||||
?.showUseType ??
|
||||
false) ...[
|
||||
toolbarController!
|
||||
.pangeaMessageEvent
|
||||
pangeaMessageEvent!
|
||||
.useType
|
||||
.iconView(
|
||||
context,
|
||||
|
|
@ -474,7 +476,8 @@ class Message extends StatelessWidget {
|
|||
.withAlpha(164),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 4),
|
||||
width: 4,
|
||||
),
|
||||
],
|
||||
if (event
|
||||
.hasAggregatedEvents(
|
||||
|
|
|
|||
|
|
@ -28,19 +28,16 @@ class RecordingDialogState extends State<RecordingDialog> {
|
|||
|
||||
bool error = false;
|
||||
String? _recordedPath;
|
||||
// #Pangea
|
||||
// final _audioRecorder = Record();
|
||||
final _audioRecorder = AudioRecorder();
|
||||
// Pangea#
|
||||
final List<double> amplitudeTimeline = [];
|
||||
|
||||
static const int bitRate = 64000;
|
||||
static const int samplingRate = 22050;
|
||||
static const int samplingRate = 44100;
|
||||
|
||||
Future<void> startRecording() async {
|
||||
try {
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
_recordedPath =
|
||||
final path = _recordedPath =
|
||||
'${tempDir.path}/recording${DateTime.now().microsecondsSinceEpoch}.${RecordingDialog.recordingFileType}';
|
||||
|
||||
final result = await _audioRecorder.hasPermission();
|
||||
|
|
@ -58,8 +55,13 @@ class RecordingDialogState extends State<RecordingDialog> {
|
|||
const RecordConfig(
|
||||
bitRate: bitRate,
|
||||
sampleRate: samplingRate,
|
||||
encoder: AudioEncoder.wav,
|
||||
numChannels: 1,
|
||||
autoGain: true,
|
||||
echoCancel: true,
|
||||
noiseSuppress: true,
|
||||
// #Pangea
|
||||
encoder: AudioEncoder.wav,
|
||||
// Pangea#
|
||||
),
|
||||
),
|
||||
// #Pangea
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ class ChatAccessSettingsPageView extends StatelessWidget {
|
|||
),
|
||||
body: MaxWidthBody(
|
||||
child: StreamBuilder<Object>(
|
||||
stream: room.onUpdate.stream,
|
||||
stream: room.client.onRoomState.stream
|
||||
.where((update) => update.roomId == controller.room.id),
|
||||
builder: (context, snapshot) {
|
||||
final canonicalAlias = room.canonicalAlias;
|
||||
final altAliases = room
|
||||
|
|
|
|||
|
|
@ -83,7 +83,8 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
StreamBuilder(
|
||||
stream: room.onUpdate.stream,
|
||||
stream: room.client.onRoomState.stream
|
||||
.where((update) => update.roomId == controller.room.id),
|
||||
builder: (context, snapshot) =>
|
||||
FutureBuilder<List<DeviceKeys>>(
|
||||
future: room.getUserDeviceKeys(),
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ class InvitationSelectionView extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
StreamBuilder<Object>(
|
||||
stream: room.onUpdate.stream,
|
||||
stream: room.client.onRoomState.stream
|
||||
.where((update) => update.roomId == room.id),
|
||||
builder: (context, snapshot) {
|
||||
final participants =
|
||||
room.getParticipants().map((user) => user.id).toSet();
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ class MultipleEmotesSettingsView extends StatelessWidget {
|
|||
title: Text(L10n.of(context)!.emotePacks),
|
||||
),
|
||||
body: StreamBuilder(
|
||||
stream: room.onUpdate.stream,
|
||||
stream: room.client.onRoomState.stream
|
||||
.where((update) => update.roomId == room.id),
|
||||
builder: (context, snapshot) {
|
||||
final packStateEvents = room.states['im.ponies.room_emotes'];
|
||||
// we need to manually convert the map using Map.of, otherwise assigning null will throw a type error.
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ abstract class ClientManager {
|
|||
},
|
||||
nativeImplementations: nativeImplementations,
|
||||
customImageResizer: PlatformInfos.isMobile ? customImageResizer : null,
|
||||
defaultNetworkRequestTimeout: const Duration(minutes: 5),
|
||||
enableDehydratedDevices: true,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1408,10 +1408,11 @@ packages:
|
|||
matrix:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: matrix
|
||||
sha256: "8610e6d207d6b667e4fe9e769d5b479db27aa1f80570880d3f171a5d3ff49d1a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
path: "."
|
||||
ref: "krille/create-missing-object-box"
|
||||
resolved-ref: f3e631b2eb477097c8fbfa188f81e6b80ee1dc58
|
||||
url: "https://github.com/famedly/matrix-dart-sdk.git"
|
||||
source: git
|
||||
version: "0.29.2"
|
||||
meta:
|
||||
dependency: transitive
|
||||
|
|
|
|||
10
pubspec.yaml
10
pubspec.yaml
|
|
@ -70,8 +70,11 @@ dependencies:
|
|||
keyboard_shortcuts: ^0.1.4
|
||||
latlong2: ^0.9.1
|
||||
linkify: ^5.0.0
|
||||
matrix: ^0.29.2
|
||||
native_imaging: ^0.1.0
|
||||
matrix:
|
||||
git:
|
||||
url: https://github.com/famedly/matrix-dart-sdk.git
|
||||
ref: krille/create-missing-object-box
|
||||
native_imaging: ^0.1.1
|
||||
package_info_plus: ^6.0.0
|
||||
pasteboard: ^0.2.0
|
||||
path: ^1.9.0
|
||||
|
|
@ -82,10 +85,7 @@ dependencies:
|
|||
punycode: ^1.0.0
|
||||
qr_code_scanner: ^1.0.1
|
||||
receive_sharing_intent: 1.4.5 # Update needs more work
|
||||
# #Pangea
|
||||
# record: 4.4.4 # Upgrade to 5 currently breaks playing on iOS
|
||||
record: ^5.0.5
|
||||
# Pangea#
|
||||
scroll_to_index: ^3.0.1
|
||||
share_plus: ^9.0.0
|
||||
shared_preferences: ^2.2.0 # Pinned because https://github.com/flutter/flutter/issues/118401
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue