Merge pull request 'Fixup UI Bugs caused by fixing performance and null soundness bugs.' (#100) from ui_fixes into trunk

Reviewed-on: flutter/flutter_app#100
This commit is contained in:
Dan Ballard 2021-05-31 16:31:52 -07:00
commit 17ae6aedcb
4 changed files with 9 additions and 5 deletions

View File

@ -40,10 +40,10 @@ class CwtchNotifier {
imagePath: data["picture"],
isBlocked: data["authorization"] == "blocked",
isInvitation: data["authorization"] == "unknown",
savePeerHistory: data["saveConversationHistory"],
savePeerHistory: data["saveConversationHistory"] == null ? "DeleteHistoryConfirmed" : data["saveConversationHistory"],
numMessages: int.parse(data["numMessages"]),
numUnread: int.parse(data["unread"]),
isGroup: data["isGroup"],
isGroup: data["isGroup"] == true,
server: data["groupServer"],
lastMessageTime: DateTime.now(), //show at the top of the contact list even if no messages yet
));

View File

@ -29,6 +29,7 @@ class ErrorHandler extends ChangeNotifier {
break;
case importBundleErrorPrefix:
handleImportBundleError(errorType);
break;
}
notifyListeners();
@ -49,6 +50,7 @@ class ErrorHandler extends ChangeNotifier {
break;
case successErrorType:
explicitAddContactSuccess = true;
importBundleSuccess = true;
break;
}
}

View File

@ -253,7 +253,7 @@ class ContactInfoState extends ChangeNotifier {
// todo: a nicer way to model contacts, groups and other "entities"
late bool _isGroup;
late String _server;
String? _server;
ContactInfoState(
this.profileOnion,
@ -268,7 +268,7 @@ class ContactInfoState extends ChangeNotifier {
numMessages = 0,
numUnread = 0,
lastMessageTime,
server = "",
server,
}) {
this._nickname = nickname;
this._isGroup = isGroup;

View File

@ -39,7 +39,9 @@ class _CwtchTextFieldState extends State<CwtchPasswordField> {
decoration: InputDecoration(
suffixIcon: IconButton(
onPressed: () {
obscureText = !obscureText;
setState(() {
obscureText = !obscureText;
});
},
icon: Icon((obscureText ? Icons.remove_red_eye : Icons.remove_red_eye_outlined), semanticLabel: label),
tooltip: label,