New Cwtch Library Integration #258

Merged
sarah merged 14 commits from cwtch-lib-integration into trunk 2021-12-10 21:02:02 +00:00
Owner

Not for review yet, just for illsutrative purposes.

Not for review yet, just for illsutrative purposes.
sarah added 2 commits 2021-11-26 00:01:21 +00:00
sarah added 1 commit 2021-11-26 22:26:20 +00:00
continuous-integration/drone/pr Build is pending Details
c00bfbb48b
Quoted Message Fixes / New Message Label Offet Fixes
sarah added 1 commit 2021-11-26 23:07:51 +00:00
continuous-integration/drone/pr Build is pending Details
b0f74ffb6d
Fixup Conversation Attribute Flow
sarah added 1 commit 2021-12-01 12:18:26 +00:00
sarah added 1 commit 2021-12-03 19:28:30 +00:00
continuous-integration/drone/pr Build is pending Details
c42be6224d
Porting Android over to new API
sarah added 1 commit 2021-12-06 20:26:08 +00:00
continuous-integration/drone/pr Build is pending Details
c9319d32d0
Much improved message caching
sarah added 1 commit 2021-12-06 21:42:51 +00:00
continuous-integration/drone/pr Build is pending Details
995282fa04
Fixup Acks / Message Keys
sarah added 2 commits 2021-12-08 05:47:41 +00:00
continuous-integration/drone/pr Build is pending Details
6b4ccd401e
Flutter Upgrades
sarah changed title from WIP: New Cwtch Library Integration to New Cwtch Library Integration 2021-12-08 05:48:18 +00:00
dan was assigned by sarah 2021-12-08 05:48:24 +00:00
erinn was assigned by sarah 2021-12-08 05:48:24 +00:00
sarah added 1 commit 2021-12-08 05:48:31 +00:00
continuous-integration/drone/pr Build is passing Details
db05c78106
Merge branch 'trunk' into cwtch-lib-integration
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/363
dan reviewed 2021-12-08 22:38:40 +00:00
dan left a comment
Owner

looks really good!
few comments to delete
two minor asks alreayd talked about in chat

looks really good! few comments to delete two minor asks alreayd talked about in chat
@ -320,3 +311,3 @@
case "ServerStateChange":
// Update the Server Cache
EnvironmentConfig.debugLog("server state changes $data");
//EnvironmentConfig.debugLog("server state changes $data");
Owner

delete or uncomment?

delete or uncomment?
lib/model.dart Outdated
@ -652,1 +670,3 @@
GlobalKey<MessageRowState> getMessageKey(String index) {
GlobalKey<MessageRowState> getMessageKey(int conversation, int message, DateTime lastread) {
String index = "c: " + conversation.toString() + " m:" + message.toString(); //+ " lr:" +lastMessageTime.toIso8601String();
//EnvironmentConfig.debugLog("looked up key $index");
Owner

delete comment?

delete comment?
@ -659,0 +691,4 @@
this.messageCache.insert(0, MessageCache(MessageMetadata(profileOnion, conversation, messageID, timestamp, senderHandle, senderImage, "", {}, false, false), data));
}
void bumpMessageCache() {
Owner

ideally internal. the public setter for totalMessages can call, and updateMessageCaches should internally inc totalMessages

ideally internal. the public setter for totalMessages can call, and updateMessageCaches should internally inc totalMessages
sarah marked this conversation as resolved
@ -98,2 +100,4 @@
}
}
class CachedMessage extends Message {
Owner

delete class?

delete class?
sarah marked this conversation as resolved
sarah added 1 commit 2021-12-08 22:39:19 +00:00
sarah added 1 commit 2021-12-09 00:41:33 +00:00
continuous-integration/drone/pr Build is pending Details
c5c0f21829
Fix New Marker. Add Placeholder for Import Handling
erinn approved these changes 2021-12-10 02:50:51 +00:00
@ -188,0 +184,4 @@
val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = a.getInt("conversation").toLong()
val indexI = a.getInt("index").toLong()
Log.i("FlwtchWorker", "Cwtch GetMessage " + profile + " " + conversation.toString() + " " + indexI.toString())
Owner

remove or debug

remove or debug
sarah marked this conversation as resolved
@ -152,6 +153,7 @@ class MainActivity: FlutterActivity() {
Log.i("handleCwtch:WorkManager", "canceling ${workInfo.id} bc tags don't include $uniqueTag")
WorkManager.getInstance(this).cancelWorkById(workInfo.id)
}
WorkManager.getInstance(this).cancelWorkById(workInfo.id)
Owner

a- remove the if...cancel above this since it's now redundant
b- probably just replace this entire loop with cancelallwork then?

a- remove the if...cancel above this since it's now redundant b- probably just replace this entire loop with cancelallwork then?
sarah marked this conversation as resolved
@ -34,6 +36,7 @@ class CwtchNotifier {
}
void handleMessage(String type, dynamic data) {
//EnvironmentConfig.debugLog("NewEvent $type $data");
Owner

?

?
sarah marked this conversation as resolved
@ -221,3 +220,1 @@
var total = int.parse(data["Data"]);
if (total != profileCN.getProfile(data["Identity"])?.contactList.getContact(contactHandle)!.totalMessages) {
profileCN.getProfile(data["Identity"])?.contactList.getContact(contactHandle)!.totalMessages = total;
// This is not dealt with by IndexedAcknowledgment
Owner

is* (fix comment)
log("this should never happen")

is* (fix comment) log("this should never happen")
sarah marked this conversation as resolved
@ -136,3 +136,2 @@
Text(
"Opening this link will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open links from people you trust. Are you sure you want to continue?"
),
"Opening this link will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open links from people you trust. Are you sure you want to continue?"),
Owner

i18n

i18n
sarah added 1 commit 2021-12-10 19:51:39 +00:00
continuous-integration/drone/pr Build is passing Details
066b4d4dec
Erinn Comment Fixups
sarah merged commit 18e3ab7bc8 into trunk 2021-12-10 21:02:02 +00:00
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/369
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch-ui#258
No description provided.