Fix errors caused by sound null safety (profile setup)
This commit is contained in:
parent
fec182f88a
commit
d0d4e17b47
|
@ -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
|
||||
));
|
||||
|
@ -165,7 +165,7 @@ class CwtchNotifier {
|
|||
print("acn status: $data");
|
||||
torStatus.handleUpdate(int.parse(data["Progress"]), data["Status"]);
|
||||
break;
|
||||
case "UpdateServerInfo":
|
||||
case "cp":
|
||||
profileCN.getProfile(data["ProfileOnion"])?.replaceServers(data["ServerList"]);
|
||||
break;
|
||||
case "NewGroup":
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ class FlwtchState extends State<Flwtch> {
|
|||
theme: mkThemeData(settings),
|
||||
// from dan: home: cwtchInit == true ? ProfileMgrView(cwtch) : SplashView(),
|
||||
// from erinn: home: columns.length == 3 ? TripleColumnView() : ProfileMgrView(),
|
||||
home: cwtchInit == true ? (columns.length == 3 ? TripleColumnView() : ShiftRightFixer(child: ProfileMgrView())) : SplashView(),
|
||||
home: cwtchInit == true ? (columns.length == 3 ? TripleColumnView() : ProfileMgrView()) : SplashView(),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue