mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-25 06:52:35 +01:00
chore: Update SDK
This commit is contained in:
parent
3c7926c81a
commit
4e73e6d9f4
@ -528,8 +528,8 @@ class ChatListController extends State<ChatList> with TickerProviderStateMixin {
|
|||||||
final client = Matrix.of(context).client;
|
final client = Matrix.of(context).client;
|
||||||
await client.roomsLoading;
|
await client.roomsLoading;
|
||||||
await client.accountDataLoading;
|
await client.accountDataLoading;
|
||||||
if (client.prevBatch?.isEmpty ?? true) {
|
if (client.onSync.value == null) {
|
||||||
await client.onFirstSync.stream.first;
|
await client.onSync.stream.first;
|
||||||
}
|
}
|
||||||
// Load space members to display DM rooms
|
// Load space members to display DM rooms
|
||||||
final spaceId = activeSpaceId;
|
final spaceId = activeSpaceId;
|
||||||
|
@ -219,7 +219,7 @@ class BackgroundPush {
|
|||||||
|
|
||||||
Future<void> setupPush() async {
|
Future<void> setupPush() async {
|
||||||
Logs().d("SetupPush");
|
Logs().d("SetupPush");
|
||||||
if (client.loginState != LoginState.loggedIn ||
|
if (client.onLoginStateChanged.value != LoginState.loggedIn ||
|
||||||
!PlatformInfos.isMobile ||
|
!PlatformInfos.isMobile ||
|
||||||
context == null) {
|
context == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -164,4 +164,10 @@ class VoipPlugin extends WidgetsBindingObserver implements WebRTCDelegate {
|
|||||||
void handleNewGroupCall(GroupCall groupCall) {
|
void handleNewGroupCall(GroupCall groupCall) {
|
||||||
// TODO: implement handleNewGroupCall
|
// TODO: implement handleNewGroupCall
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<webrtc_impl.MediaStream> cloneStream(webrtc_impl.MediaStream stream) {
|
||||||
|
// TODO: implement cloneStream
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,33 +16,28 @@ class ConnectionStatusHeader extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ConnectionStatusHeaderState extends State<ConnectionStatusHeader> {
|
class _ConnectionStatusHeaderState extends State<ConnectionStatusHeader> {
|
||||||
StreamSubscription? _onSyncSub;
|
late final StreamSubscription _onSyncSub;
|
||||||
static bool _anySyncReceived = false;
|
|
||||||
|
|
||||||
SyncStatusUpdate _status =
|
@override
|
||||||
const SyncStatusUpdate(SyncStatus.waitingForResponse);
|
void initState() {
|
||||||
|
_onSyncSub = Matrix.of(context).client.onSyncStatus.stream.listen(
|
||||||
|
(_) => setState(() {}),
|
||||||
|
);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_onSyncSub?.cancel();
|
_onSyncSub.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
_onSyncSub ??= Matrix.of(context).client.onSyncStatus.stream.listen(
|
final status = Matrix.of(context).client.onSyncStatus.value ??
|
||||||
(status) => setState(
|
const SyncStatusUpdate(SyncStatus.waitingForResponse);
|
||||||
() {
|
final hide = Matrix.of(context).client.onSync.value != null &&
|
||||||
_status = status;
|
status.status != SyncStatus.error &&
|
||||||
if (status.status == SyncStatus.finished) {
|
|
||||||
_anySyncReceived = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
final hide = _anySyncReceived &&
|
|
||||||
_status.status != SyncStatus.error &&
|
|
||||||
Matrix.of(context).client.prevBatch != null;
|
Matrix.of(context).client.prevBatch != null;
|
||||||
|
|
||||||
return AnimatedContainer(
|
return AnimatedContainer(
|
||||||
@ -60,12 +55,12 @@ class _ConnectionStatusHeaderState extends State<ConnectionStatusHeader> {
|
|||||||
height: 24,
|
height: 24,
|
||||||
child: CircularProgressIndicator.adaptive(
|
child: CircularProgressIndicator.adaptive(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
value: hide ? 1.0 : _status.progress,
|
value: hide ? 1.0 : status.progress,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Text(
|
Text(
|
||||||
_status.toLocalizedString(context),
|
status.toLocalizedString(context),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(color: Theme.of(context).colorScheme.onSurface),
|
style: TextStyle(color: Theme.of(context).colorScheme.onSurface),
|
||||||
|
@ -13,10 +13,8 @@ class LoadingView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback(
|
WidgetsBinding.instance.addPostFrameCallback(
|
||||||
(_) => VRouter.of(context).to(
|
(_) => VRouter.of(context).to(
|
||||||
Matrix.of(context)
|
Matrix.of(context).widget.clients.any((client) =>
|
||||||
.widget
|
client.onLoginStateChanged.value == LoginState.loggedIn)
|
||||||
.clients
|
|
||||||
.any((client) => client.loginState == LoginState.loggedIn)
|
|
||||||
? '/rooms'
|
? '/rooms'
|
||||||
: '/home',
|
: '/home',
|
||||||
queryParameters: VRouter.of(context).queryParameters,
|
queryParameters: VRouter.of(context).queryParameters,
|
||||||
|
@ -211,7 +211,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
client.onLoginStateChanged.sink.addError(e, s);
|
client.onLoginStateChanged.addError(e, s);
|
||||||
SentryController.captureException(e, s);
|
SentryController.captureException(e, s);
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
|
@ -1019,7 +1019,7 @@ packages:
|
|||||||
name: matrix
|
name: matrix
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.10.1"
|
version: "0.10.3"
|
||||||
matrix_api_lite:
|
matrix_api_lite:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -57,7 +57,7 @@ dependencies:
|
|||||||
keyboard_shortcuts: ^0.1.4
|
keyboard_shortcuts: ^0.1.4
|
||||||
localstorage: ^4.0.0+1
|
localstorage: ^4.0.0+1
|
||||||
lottie: ^1.2.2
|
lottie: ^1.2.2
|
||||||
matrix: ^0.10.1
|
matrix: ^0.10.3
|
||||||
matrix_homeserver_recommendations: ^0.2.0
|
matrix_homeserver_recommendations: ^0.2.0
|
||||||
matrix_link_text: ^1.0.2
|
matrix_link_text: ^1.0.2
|
||||||
native_imaging:
|
native_imaging:
|
||||||
@ -158,5 +158,3 @@ dependency_overrides:
|
|||||||
git:
|
git:
|
||||||
url: https://github.com/TheOneWithTheBraid/snapping_sheet.git
|
url: https://github.com/TheOneWithTheBraid/snapping_sheet.git
|
||||||
ref: listenable
|
ref: listenable
|
||||||
#matrix:
|
|
||||||
# path: ../famedlysdk/
|
|
||||||
|
Loading…
Reference in New Issue
Block a user