Enable Sender Side Image Previews #327

Merged
erinn merged 4 commits from sender_size into trunk 2022-01-20 22:44:19 +00:00
Owner
No description provided.
erinn was assigned by sarah 2022-01-20 22:00:59 +00:00
sarah added 1 commit 2022-01-20 22:00:59 +00:00
continuous-integration/drone/pr Build is pending Details
797279d6d7
Enable Sender Side Image Previews
erinn requested changes 2022-01-20 22:10:39 +00:00
@ -244,6 +246,11 @@ class CwtchNotifier {
case "UpdatedProfileAttribute":
if (data["Key"] == "public.profile.name") {
profileCN.getProfile(data["ProfileOnion"])?.nickname = data["Data"];
} else if (data["Key"].toString().endsWith(".path")) {
Owner

should probably add a startsWith here also

should probably add a `startsWith` here also
@ -246,1 +248,4 @@
profileCN.getProfile(data["ProfileOnion"])?.nickname = data["Data"];
} else if (data["Key"].toString().endsWith(".path")) {
// local.conversation.filekey.path
List<String> keyparts = data["Key"].toString().split(".");
Owner

and a len(keyparts) check

and a len(keyparts) check
@ -253,7 +253,18 @@ class ProfileInfoState extends ChangeNotifier {
}
}
void downloadSetPathDangerous(String fileKey, String path) {
Owner

needs a comment explaining "dangerous"

needs a comment explaining "dangerous"
@ -256,1 +264,4 @@
}
String? downloadFinalPath(String fileKey) {
var path = this._downloads[fileKey];
Owner

delete

delete
@ -61,0 +62,4 @@
if (downloadComplete && path == null && metadata.attributes["filepath"] != null) {
path = metadata.attributes["filepath"];
} else if (downloadComplete && path != null && metadata.attributes["filepath"] == null) {
if (metadata.attributes["filepath"] == null) {
Owner

redundant, remove

redundant, remove
@ -82,2 +94,4 @@
senderDisplayStr = Provider.of<MessageMetadata>(context).senderHandle;
}
} else {
senderIsContact = true;
Owner

refactor or at least comment

refactor or at least comment
sarah added 1 commit 2022-01-20 22:19:28 +00:00
continuous-integration/drone/pr Build is pending Details
d095971cb3
Sender side previews - fixing up PR comments
sarah added 1 commit 2022-01-20 22:32:47 +00:00
continuous-integration/drone/pr Build is passing Details
6364ebffc6
Update lcg
sarah changed title from WIP: Enable Sender Side Image Previews to Enable Sender Side Image Previews 2022-01-20 22:33:06 +00:00
erinn approved these changes 2022-01-20 22:35:05 +00:00
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/495
sarah added 1 commit 2022-01-20 22:43:03 +00:00
continuous-integration/drone/pr Build is pending Details
13c1a52442
Only allow path override for senders
erinn merged commit 7dcc1c863a into trunk 2022-01-20 22:44:19 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 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#327
No description provided.