Merge pull request 'Formatting' (#322) from torcache into trunk
continuous-integration/drone/push Build is passing Details

Reviewed-on: #322
This commit is contained in:
Dan Ballard 2022-01-19 22:01:26 +00:00
commit 08b9dfed5f
9 changed files with 37 additions and 38 deletions

View File

@ -68,4 +68,4 @@ class AppState extends ChangeNotifier {
}
bool isLandscape(BuildContext c) => MediaQuery.of(c).size.width > MediaQuery.of(c).size.height;
}
}

View File

@ -9,7 +9,7 @@ class ChatMessage {
d = json['d'];
Map<String, dynamic> toJson() => {
'o': o,
'd': d,
};
}
'o': o,
'd': d,
};
}

View File

@ -32,17 +32,17 @@ class ContactInfoState extends ChangeNotifier {
ContactInfoState(this.profileOnion, this.identifier, this.onion,
{nickname = "",
isGroup = false,
accepted = false,
blocked = false,
status = "",
imagePath = "",
savePeerHistory = "DeleteHistoryConfirmed",
numMessages = 0,
numUnread = 0,
lastMessageTime,
server,
archived = false}) {
isGroup = false,
accepted = false,
blocked = false,
status = "",
imagePath = "",
savePeerHistory = "DeleteHistoryConfirmed",
numMessages = 0,
numUnread = 0,
lastMessageTime,
server,
archived = false}) {
this._nickname = nickname;
this._isGroup = isGroup;
this._accepted = accepted;
@ -211,4 +211,4 @@ class ContactInfoState extends ChangeNotifier {
this.messageCache.firstWhere((element) => element?.metadata.messageID == messageID)?.metadata.ackd = true;
notifyListeners();
}
}
}

View File

@ -122,4 +122,4 @@ class ContactListState extends ChangeNotifier {
int idx = _contacts.indexWhere((element) => element.onion == byHandle);
return idx >= 0 ? _contacts[idx] : null;
}
}
}

View File

@ -24,4 +24,4 @@ String prettyBytes(int bytes) {
} else {
return bytes.toString() + " B";
}
}
}

View File

@ -4,4 +4,4 @@ class MessageCache {
final MessageMetadata metadata;
final String wrapper;
MessageCache(this.metadata, this.wrapper);
}
}

View File

@ -152,21 +152,21 @@ class ProfileInfoState extends ChangeNotifier {
profileContact.lastMessageTime = DateTime.fromMillisecondsSinceEpoch(1000 * int.parse(contact["lastMsgTime"]));
} else {
this._contacts.add(ContactInfoState(
this.onion,
contact["identifier"],
contact["onion"],
nickname: contact["name"],
status: contact["status"],
imagePath: contact["picture"],
accepted: contact["accepted"],
blocked: contact["blocked"],
savePeerHistory: contact["saveConversationHistory"],
numMessages: contact["numMessages"],
numUnread: contact["numUnread"],
isGroup: contact["isGroup"],
server: contact["groupServer"],
lastMessageTime: DateTime.fromMillisecondsSinceEpoch(1000 * int.parse(contact["lastMsgTime"])),
));
this.onion,
contact["identifier"],
contact["onion"],
nickname: contact["name"],
status: contact["status"],
imagePath: contact["picture"],
accepted: contact["accepted"],
blocked: contact["blocked"],
savePeerHistory: contact["saveConversationHistory"],
numMessages: contact["numMessages"],
numUnread: contact["numUnread"],
isGroup: contact["isGroup"],
server: contact["groupServer"],
lastMessageTime: DateTime.fromMillisecondsSinceEpoch(1000 * int.parse(contact["lastMsgTime"])),
));
}
});
}
@ -269,4 +269,4 @@ class ProfileInfoState extends ChangeNotifier {
}
return prettyBytes((bytes / seconds).round()) + "/s";
}
}
}

View File

@ -27,4 +27,4 @@ class ProfileListState extends ChangeNotifier {
_profiles.removeWhere((element) => element.onion == onion);
notifyListeners();
}
}
}

View File

@ -3,7 +3,6 @@ import 'package:cwtch/models/profile.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
bool noFilter(ContactInfoState peer) {
return true;
}