cache
trunk
needs:
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch-ui/489
formatting
this.messageCache.insert(0, MessageCache(MessageMetadata(profileOnion, conversation, messageID, timestamp, senderHandle, senderImage, "", {}, false, false, isAuto), data));
this.totalMessages += 1;
}
void newMessage(int identifier, int messageID, DateTime timestamp, String senderHandle, String senderImage, bool isAuto, String data, String? contenthash, bool selectedConversation) {
why doesn't this notify listeners?
Future<Message> messageHandler(BuildContext context, String profileOnion, int conversationIdentifier,
{bool byIndex = false, int? index, bool byID = false, int? id, bool byHash = false, String? hash}) {
var malformedMetadata = MessageMetadata(profileOnion, conversationIdentifier, 0, DateTime.now(), "", "", "", <String, String>{}, false, true, false);
if (!byIndex && !byID && !byHash) {
Use an enum to have the compiler do this check
EnvironmentConfig.debugLog("Error calling messageHandler: one of byIndex, byID, byHash must be set");
return Future.value(MalformedMessage(malformedMetadata));
if ((byID && id == null) || (byIndex && index == null) || (byHash && hash == null)) {
Use types to have the compiler enforce this coupling
https://build.openprivacy.ca/cwtch.im/cwtch-ui/491
d0fecbd545
No due date set.
This pull request currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?
needs:
message cachingto WIP message caching 4 months agoWIP message cachingto message caching 4 months agoDrone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch-ui/489
formatting
this.messageCache.insert(0, MessageCache(MessageMetadata(profileOnion, conversation, messageID, timestamp, senderHandle, senderImage, "", {}, false, false, isAuto), data));
this.totalMessages += 1;
}
void newMessage(int identifier, int messageID, DateTime timestamp, String senderHandle, String senderImage, bool isAuto, String data, String? contenthash, bool selectedConversation) {
why doesn't this notify listeners?
Future<Message> messageHandler(BuildContext context, String profileOnion, int conversationIdentifier,
{bool byIndex = false, int? index, bool byID = false, int? id, bool byHash = false, String? hash}) {
var malformedMetadata = MessageMetadata(profileOnion, conversationIdentifier, 0, DateTime.now(), "", "", "", <String, String>{}, false, true, false);
if (!byIndex && !byID && !byHash) {
Use an enum to have the compiler do this check
EnvironmentConfig.debugLog("Error calling messageHandler: one of byIndex, byID, byHash must be set");
return Future.value(MalformedMessage(malformedMetadata));
}
if ((byID && id == null) || (byIndex && index == null) || (byHash && hash == null)) {
Use types to have the compiler enforce this coupling
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch-ui/491
d0fecbd545
into trunk 4 months agoReviewers
d0fecbd545
.