image previews #267

Merged
sarah merged 29 commits from ipreview into trunk 2021-12-19 20:05:09 +00:00
Owner
* depends on https://git.openprivacy.ca/cwtch.im/libcwtch-go/pulls/51
erinn added 20 commits 2021-12-18 01:08:45 +00:00
dan reviewed 2021-12-18 18:47:30 +00:00
dan left a comment
Owner

this PR will need a changepassword libcwtch PR to verify/merged first

Soooo for 1.6 I think we need to start tabbing global settings with options and experiments tabs?

this PR will need a changepassword libcwtch PR to verify/merged first Soooo for 1.6 I think we need to start tabbing global settings with options and experiments tabs?
@ -18,1 +18,3 @@
void DeleteProfile(String onion, String pass);
void DeleteProfile(String profile, String pass);
// ignore: non_constant_identifier_names
void ChangePassword(String profile, String pass, String newpass, String newpassAgain);
Owner

lol changePassword got rolled into this?

lol changePassword got rolled into this?
dan marked this conversation as resolved
@ -55,6 +57,8 @@ abstract class Cwtch {
void CheckDownloadStatus(String profile, String fileKey);
// ignore: non_constant_identifier_names
void VerifyOrResumeDownload(String profile, int handle, String filekey);
// ignore: non_constant_identifier_names
Owner

comment here possibly as well that this is android only functionality?

comment here possibly as well that this is android only functionality?
erinn marked this conversation as resolved
@ -223,3 +225,3 @@
break;
case "SendMessageToPeerError":
// Ignore
// Ignore dealt with by IndexedFailure
Owner

confirm? I don't see IndexedFailure being issued in Cwtch or libcwtch-go, they still appear to issue SendMessageToPeerError and SendMessageToGroupError

confirm? I don't see IndexedFailure being issued in Cwtch or libcwtch-go, they still appear to issue SendMessageToPeerError and SendMessageToGroupError
dan marked this conversation as resolved
@ -695,1 +700,4 @@
@override
String defaultDownloadPath() {
Map<String, String> envVars = Platform.environment;
return path.join(envVars['HOME']!, "Downloads");
Owner

check above in L134 in Start. MacOS and Linux should be good but we need something like

if (Platform.isWindows) { path.join(envVars['UserProfile']!, "Downloads"); }

check above in L134 in Start. MacOS and Linux should be good but we need something like ` if (Platform.isWindows) { path.join(envVars['UserProfile']!, "Downloads"); } `
erinn marked this conversation as resolved
lib/model.dart Outdated
@ -404,3 +401,2 @@
} else {
print("error: received progress for unknown download " + fileKey);
}
notifyListeners();
Owner

could put one single notifyListeners at the bottom? as its at the end of the if and else?

could put one single notifyListeners at the bottom? as its at the end of the if and else?
erinn marked this conversation as resolved
@ -65,1 +66,4 @@
}
}
} catch (e) {
// provider check failed...make an expensive call...
Owner

still TODO?

still TODO?
Owner

nope it is a fall through

nope it is a fall through
sarah marked this conversation as resolved
@ -279,3 +281,3 @@
}
void _createPressed() {
void _createPressed() async {
Owner

do we need a Provider.of(context, listen: false).reset(); something like here?

do we need a Provider.of<ErrorHandler>(context, listen: false).reset(); something like here?
@ -315,0 +317,4 @@
if (AppLocalizations.of(context) != null) {
final snackBar = SnackBar(content: Text(AppLocalizations.of(context)!.passwordChangeError));
ScaffoldMessenger.of(context).showSnackBar(snackBar);
Navigator.pop(context);
Owner

why do we pop the nav on error? shouldn't we stay on this pane?

why do we pop the nav on error? shouldn't we stay on this pane?
@ -315,0 +326,4 @@
final snackBar = SnackBar(content: Text(AppLocalizations.of(context)!.newPassword));
ScaffoldMessenger.of(context).showSnackBar(snackBar);
Navigator.pop(context);
return; // otherwise round and round we go...
Owner

dont understand the comment?

dont understand the comment?
@ -388,2 +391,2 @@
print("file size cannot exceed 10 gigabytes");
//todo: toast error
final snackBar = SnackBar(
content: Text("File size cannot exceed 10 GB"),
Owner

translate

translate
dan marked this conversation as resolved
@ -393,0 +418,4 @@
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text("Are you sure you want to send $path?"),
Owner

translate

translate
@ -393,0 +444,4 @@
),
SizedBox(width: 20,),
ElevatedButton(
child: Text("Send File", semanticsLabel: "Send File"),
Owner

tranalte

tranalte
@ -49,0 +61,4 @@
var path = Provider.of<ProfileInfoState>(context).downloadFinalPath(widget.fileKey());
if (downloadComplete) {
var lpath = path!.toLowerCase();
if (lpath.endsWith("jpg") || lpath.endsWith("jpeg") || lpath.endsWith("png") || lpath.endsWith("gif") || lpath.endsWith("webp") || lpath.endsWith("bmp")) {
Owner

i've seen this check in a few places, prolly make into a utility function

i've seen this check in a few places, prolly make into a utility function
erinn marked this conversation as resolved
@ -96,0 +116,4 @@
padding: EdgeInsets.all(1.0),
child: Image.file(
myFile!,
cacheWidth: 2048, // limit the amount of space the image can decode too, we keep this high-ish to allow quality previews...
Owner

this still seems higher than we'll likely display? 1080p screens in full screen single pane mode will stil be too narrow even ignoring padding?

this still seems higher than we'll likely display? 1080p screens in full screen single pane mode will stil be too narrow even ignoring padding?
@ -96,0 +161,4 @@
]));
}
} else if (!senderIsContact) {
wdgDecorations = Text("Add this account to your contacts in order to accept this file.");
Owner

translate

translate
dan marked this conversation as resolved
erinn added 1 commit 2021-12-19 02:02:50 +00:00
continuous-integration/drone/pr Build is pending Details
26c84472d8
l10n
erinn added 4 commits 2021-12-19 02:09:24 +00:00
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch-ui/409
erinn added 1 commit 2021-12-19 02:39:29 +00:00
continuous-integration/drone/pr Build is failing Details
09496713d9
merge trunk
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch-ui/410
erinn added 1 commit 2021-12-19 02:44:29 +00:00
continuous-integration/drone/pr Build is pending Details
d2d07c81e3
bump lcg
dan added 1 commit 2021-12-19 04:32:59 +00:00
continuous-integration/drone/pr Build is passing Details
92dea31a86
drone update to use new flutter 2.8 containers
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/412
sarah added 1 commit 2021-12-19 20:04:31 +00:00
continuous-integration/drone/pr Build is pending Details
b0cf3d2021
Merge branch 'trunk' into ipreview
sarah changed title from wip: image previews to image previews 2021-12-19 20:04:48 +00:00
sarah approved these changes 2021-12-19 20:05:04 +00:00
sarah merged commit d13ded8f50 into trunk 2021-12-19 20:05:09 +00:00
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#267
No description provided.