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