Update to new sdk
This commit is contained in:
parent
df358328df
commit
a49d0f8958
11 changed files with 161 additions and 32 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/components/message_content.dart';
|
||||
import 'package:fluffychat/utils/ChatTime.dart';
|
||||
import 'package:fluffychat/utils/app_route.dart';
|
||||
import 'package:fluffychat/views/chat.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -38,7 +39,7 @@ class ChatListItem extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Text(room.timeCreated.toEventTimeString()),
|
||||
Text(ChatTime(room.timeCreated).toEventTimeString()),
|
||||
room.notificationCount > 0
|
||||
? Container(
|
||||
width: 20,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'package:bubble/bubble.dart';
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/components/dialogs/redact_message_dialog.dart';
|
||||
import 'package:fluffychat/components/message_content.dart';
|
||||
import 'package:fluffychat/utils/ChatTime.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../avatar.dart';
|
||||
|
|
@ -96,7 +97,7 @@ class Message extends StatelessWidget {
|
|||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
event.time.toEventTimeString(),
|
||||
ChatTime(event.time).toEventTimeString(),
|
||||
style: TextStyle(color: textColor, fontSize: 12),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -38,12 +38,12 @@ class MatrixState extends State<Matrix> {
|
|||
|
||||
final credentialsStr = storage.getItem(widget.clientName);
|
||||
if (credentialsStr == null || credentialsStr.isEmpty) {
|
||||
client.connection.onLoginStateChanged.add(LoginState.loggedOut);
|
||||
client.onLoginStateChanged.add(LoginState.loggedOut);
|
||||
return;
|
||||
}
|
||||
print("[Matrix] Restoring account credentials");
|
||||
final Map<String, dynamic> credentials = json.decode(credentialsStr);
|
||||
client.connection.connect(
|
||||
client.connect(
|
||||
newDeviceID: credentials["deviceID"],
|
||||
newDeviceName: credentials["deviceName"],
|
||||
newHomeserver: credentials["homeserver"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue